安装 wget
yum install -y wget
进入目录
cd /etc/yum.repos.d/
创建目录
mkdir backup
默认源配备份
mv C* backup/
下载阿里云yum源
wget -O /etc/yum.repos.d/CenOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
清除旧缓存
yum clean all
创建新缓存
yum makecache
更新yum
yum update -y