更换前先备份系统自带yum源配置文件,以防万一
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
下载ailiyun的yum源配置文件到/etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
生成缓存
yum makecache
更新系统
yum -y update