参照
http://mirrors.163.com/.help/centos.html
备份/etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
下载对应的repo文件,放入/etc/yum.repos.d/
curl http://mirrors.163.com/.help/CentOS7-Base-163.repo -o CentOS7-Base-163.repo
运行以下命令生成缓存
yum clean all yum makecache