1、切用户、切到原文件件
su root
cd /etc/yum.repos.d/
2、下载源文件
wget http://mirrors.aliyun.com/repo/Centos-7.repo
3、重命名
mv CentOS-Base.repo CentOS-Base.repo.bak
mv Centos-7.repo CentOS-Base.repo
4、更新缓存
yum clean all
yum makecache
yum update
标签:repo,CentOS,CentOs,国内,Centos,Base,yum,设置 From: https://www.cnblogs.com/bestzhang/p/17711749.html