1、cd 到yum源文件所在位置
cd /etc/yum.repos.d
2、备份CentOS-Base.repo源文件
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
3、下载阿里云yum源配置文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
4、清理yum缓存
yum clean all
5、生成新的缓存
yum makecache
6、更新yum源
yum update
借鉴文章地址:https://blog.csdn.net/qq_52545155/article/details/137229782
标签:repo,CentOS,repos,centos7,etc,Base,yum,镜像 From: https://www.cnblogs.com/caixiaozi/p/18132434