1.备份本地yum源(避免下载崩溃用于回滚[重命名即可])
[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
2.下载阿里yum源配置文件
[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3.更新yum缓存(不需要yum update)
[root@localhost~]# clean all
[root@localhost~]# yum makecache
扩展
查看当前yum源
[root@localhost~]# yum repolist
更多版本阿里yum源repo文件