centos 6.x/7.x使用yum升级git版本
相信很多服务器上的git要么是1.7.1或者就是1.8.x,如果要大面积升级的话,还是用yum来搞方便.
1.安装yum源
centos6:
wget http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm && rpm -ivh wandisco-git-release-6-1.noarch.rpm
centos7:
wget http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-1.noarch.rpm && rpm -ivh wandisco-git-release-7-1.noarch.rpm
or
wget http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm && rpm -ivh wandisco-git-release-7-2.noarch.rpm
2.安装git 2.x
yum install git -y
3.验证
git --version
git version 2.14.1
好了,可以看到git已经升级到2.14.1的版本了,其实centos6还可以升到2.16的版本,用以下的yum源就可以了:
wget https://centos6.iuscommunity.org/ius-release.rpm
rpm -ivh ius-release.rpm
yum install git2u -y
git --version
git version 2.16.2
-- 来自 https://blog.slogra.com/post-721.html