在Linux系统上安装Git

1,653 阅读1分钟

yum 安装高版本Git

centos默认的的yum仓库中的默认版本很低,有时我们需要安装高版本git,编译安装又太麻烦。
下面介绍一种yum安装高版本git的方法

1,安装 WANDisco 仓库包

# 安装 centos6 WANDisco 仓库
yum install http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm

# 安装 centos7 WANDisco 仓库
yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm

2,安装 Git

yum -y install git

3,版本验证

git version

centos7 安装快捷复制

yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm
yum -y install git
git version