1.备份源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2.切换目录
cd /etc/yum.repos.d/
3.下载阿里源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
4.清除缓存
yum clean all
5.生成新的缓存
yum makecache
6.更新系统
yum -y update