1. 安装wget
$ yum install -y wget
2. 备份/etc/yum.repos.d/CentOS-Base.repo
$ cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
3. 下载阿里云的Centos-7.repo文件
$ wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
4. 重新加载yum
$ yum clean all
$ yum update