1.安装依赖包:
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
2.下载git:
wget https://www.kernel.org/pub/software/scm/git/git-2.3.6.tar.gz
3.建立git用户:
[[email protected] ~]# useradd -r -m git
4.编译安装:
[[email protected] git-2.3.6]# cd /tmp/git-2.3.6
[[email protected] git-2.3.6]# ./configure --prefix=/usr/local/git-2.3.6
[[email protected] git-2.3.6]# make && make install
[[email protected] git-2.3.6]# ln -s git-2.3.6 git
5.测试:
[[email protected] local]# git --version
git version 2.3.6
时间: 2024-10-27 06:58:18