Linux 修改默认yum源为阿里云

备份当前的yum源,重命名
mv /etc/yum.repos.d /etc/yum.repos.d.backup4comex

新建空的yum源设置目录

mkdir /etc/yum.repos.d

下载阿里云的yum源配置

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

重建缓存

yum clean all
yum makecache

备注:
其它的yum源,如网易:http://mirrors.163.com/.help/CentOS7-Base-163.repo

原文地址:https://www.cnblogs.com/gdjlc/p/15731491.html