0
点赞
收藏
分享

微信扫一扫

Centos7安装IUS源


Centos7安装IUS源

  • ​​安装IUS源​​
  • ​​配置IUS国内源​​
  • ​​刷新缓存​​
  • ​​Centos7使用yum安装git224版本​​
  • ​​卸载老版git​​
  • ​​查询源里的git版本号​​
  • ​​安装git224​​
  • ​​查看git版本​​

安装IUS源

为RHEL和CentOS提供高质量、最新版的软件,如PHP, Python, MySQL等。

参考: ​​https://ius.io/setup​​

# 导入gpg key
rpm --import https://repo.ius.io/RPM-GPG-KEY-IUS-7

# 官方方法安装IUS源
yum install https://repo.ius.io/ius-release-el7.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -y

# 通过aliyun安装IUS源
yum install

安装完成后在​​/etc/yum.repos.d​​​目录下会出现​​ius.repo​​文件,默认启用源.



配置IUS国内源

# 配置IUS国内源
sed -i "s|repo.ius.io|mirrors.tuna.tsinghua.edu.cn/ius|g"



刷新缓存

# 刷新缓存
yum repolist && yum clean all &&



Centos7使用yum安装git224版本



卸载老版git

# 卸载老版git
yum autoremove git



查询源里的git版本号

# 查询源里的git版本号
yum search git|grep -E "^git"



安装git224

# 安装git224
yum install



查看git版本

git version
# 打印版本
git version 2.24.4


举报

相关推荐

0 条评论