yum源更换

1.备份

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2.下载对应版本的CentOS-Base.repo, 放入/etc/yum.repos.d/

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

3.生成缓存

yum clean all
yum makecache
原文地址:https://www.cnblogs.com/flhw/p/13491111.html