标签:Git
1、下载编译工具yum -y groupinstall "Development Tools"
2、下载依赖包
yum -y install zlib-devel perl-ExtUtils-MakeMaker asciidoc xmlto openssl-devel
3、下载最新版git
wget https://github.com/git/git/archive/v2.16.2.tar.gz
4、解压
tar -zxvf git-2.16.2.tar.gz
5、进入目录配置
cd git-2.16.2
make configure
./configure --prefix=/usr/local/git
6、安装
make && make install
7、配置全局路径
vi /etc/profile
在结尾添加
export PATH="/usr/local/git/bin:$PATH"
刷新环境变量
source /etc/profile
8、查看git版本
git --version
标签:Git
原文地址:http://blog.51cto.com/ligeo5210/2084026