cd /etc/yum.repos.d/
mkdir repo_bak
mv *.repo repo_bak/
到网易和阿里开源镜像站点下载系统对应版本的repo文件
curl -O http://mirrors.aliyun.com/repo/Centos-7.repo
curl -O http://mirrors.163.com/.help/CentOS7-Base-163.repo
清除系统所有yum缓存
yum clean all
生成yum缓存
yum makecache
更新yum
yum update