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 http://mirrors.aliyun.com/repo/Centos-7.repo
3.生成缓存
yum clean all & yum makecache
转载于:https://www.cnblogs.com/nemooo/p/6652153.html