1、下载git
wget https:
//github
.com
/git/git/archive/v2
.14.1.zip
2、安装依赖
yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel curl-devel perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
3、解压git
unzip v2.14.1.zip
4、将git安装到/usr/local/git上
先进入git-2.14.1文件夹, 编译,安装
cd git-2.14.1
make
prefix=
/usr/local
all
make
prefix=
/usr/local
install
5、验证是否安装完成
git --version
说明安装成功