下载数据源
wget http://mirrors.aliyun.com/repo/Centos-7.repo
2.备份数据源
cd /etc/yum.repos.d/
mv Centos-Base.repo Centos-Base.repo_back
3.复制新数据源
cp Centos-7.repo /etc/yum.repos.d/
cd /etc/yum.repos.d/
mv Centos-7.repo Centos-Base.repo
更新数据源
yum clean all
yum makecache
yum -y update