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