- yum -y groupinstall "Development Tools"
- yum -y install zlib-devel perl-ExtUtils-MakeMaker asciidoc xmlto openssl-devel
登录https://github.com/git/git/releases查看git的最新版。不要下载带有-rc的,因为它代表了一个候选发布版本。
- wget https://www.kernel.org/pub/software/scm/git/git-2.13.3.tar.gz
4.解压
- tar -zxvf git-2.11.0.tar.gz
5、进入目录配置
- cd git-2.13.3
- ./configure --prefix=/usr/local/git
6.安装
- make && make install
7.配置全局路径
- export PATH="/usr/local/git/bin:$PATH"
- source /etc/profile
8.查看git版本
- git --version
来源: http://www.bubuko.com/infodetail-2408028.html