参考https://www.cnblogs.com/xjh713/p/7458437.html
备份本地yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
获取阿里yum源配置文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
清理缓存重新生成缓存
yum clean all
yum makecache
更新cache
yum makecache
更新yum
yum -y update