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