安装编译环境
yum -y install zlib-devel openssl-devel perl cpio expat-devel gettext-devel curl autoconf
下载git版本安装
wget https://github.com/git/git/archive/v2.4.5.zip
解压安装
unzip git-2.4.5.zip
cd git-2.4.5
autoconf
./configure
make
make install
安装完成
git --version
注:之前安装1.8版本时编译报错,可安装以下依赖
yum -y install perl-ExtUtils-MakeMaker package