首页 > 系统相关 >CentOS7更新阿里云yum源

CentOS7更新阿里云yum源

时间:2023-01-17 21:00:39浏览次数:58  
标签:repo CentOS repos Base CentOS7 etc 阿里 yum

CentOS7更新阿里云yum源,​​参考阿里云官方文档​​,操作如下:

1,备份旧源文件

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2,下载新源文件

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

或者

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

3,清理旧缓存

yum clean all

4,生成新缓存

yum makecache


标签:repo,CentOS,repos,Base,CentOS7,etc,阿里,yum
From: https://blog.51cto.com/u_142623/6017825

相关文章