1. 备份:
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2.下载CentOS-Base.repo 到/etc/yum.repos.d/
cd /etc/yum.repos.d/
163: wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
阿里云: wget https://mirrors.aliyun.com/repo/Centos-7.repo
3. 生成缓存
yum clean all
yum makecache
4. 更新
yum -y update