git2.0的安裝-centos6.5

NO IMAGE

centos6.5 安裝git2.0
1.安裝編譯git時需要的包

# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
# yum install  gcc perl-ExtUtils-MakeMaker

2.刪除已有的git

# yum remove git

3.下載git原始碼,2.0.0版本的下載地址:http://pan.baidu.com/s/1qXFnOxI

# cd /usr/src
# wget https://www.kernel.org/pub/software/scm/git/git-2.0.5.tar.gz
# tar xzf git-2.0.5.tar.gz

4.編譯安裝

# cd git-2.0.5
# make prefix=/usr/local/git all
# make prefix=/usr/local/git install
# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
# source /etc/bashrc

5.檢查一下版本號

# git --version

轉載自:https://www.cnblogs.com/fuyuanming/p/5804695.html