1.首先备份/etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2.可以访问http://mirrors.163.com查找对应的repo文件地址
获取repo文件
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
3.
yum clean all
yum makecache