切换到/etc/yum.repos.d/ 并备份原本的yum
cd /etc/yum.repos.d/
mv CentOs-Base.repo CentOs-Base.repo.bak
下载阿里云的yum
wget http://mirrors.aliyun.com/repo/Centos-7.repo
mv Centos-7.repo CentOs-Base.repo
执行yum源更新命令
yum clean all
yum makecache
yum update