1 cd /etc/yum.repos.d (进入原有yum源文件下)
mv CentOS-Base.repo CentOS-Base.repo.bak (备份一下)
2 wget -O Centos-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo(下载镜像源,如果没有wget,先yum install -y wget)
3 yum clean all(清空缓存)
yum makecache(生成新缓存)
yum -y update(更新镜像源)