前言

不使用ius仓库已不能安装git2.x版本

安装
安装epel-release

yum -y install epel-release

安装ius仓库
cat > /etc/yum.repos.d/ius.repo <<-EOF
[ius]
name = IUS for Enterprise Linux 7 - $basearch
baseurl = https://repo.ius.io/7/$basearch/
enabled = 1
repo_gpgcheck = 0
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-IUS-7

[ius-debuginfo]
name = IUS for Enterprise Linux 7 - $basearch - Debug
baseurl = https://repo.ius.io/7/$basearch/debug/
enabled = 0
repo_gpgcheck = 0
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-IUS-7

[ius-source]
name = IUS for Enterprise Linux 7 - Source
baseurl = https://repo.ius.io/7/src/
enabled = 0
repo_gpgcheck = 0
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-IUS-7
EOF
搜索git2.x版本

yum search git

... ...
git222.x86_64 : Fast Version Control System
git224.x86_64 : Fast Version Control System
... ...
安装git2.x

yum -y install git222

结语

… …

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐