1、下载安装包
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.8.0.tar.gz
2、安装依赖
sudo yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel curl-devel perl-ExUtils-CBuilder perl-ExUtils-MakeMaker
3、解压git包,并进入解压后的目录
(1)tar -zxvf git-2.8.0.tar.gz
(2)cd git-2.8.0
4、编译安装
(1)sudo make prefix=/usr/local all
(2)sudo make prefix=/usr/local install
5、验证 git --version