备份源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5 (目前已经停用了,无效)
wget -O /etc/yum.repos.d/CentOS-Base.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo
3、之后运行yum makecache生成缓存
yum clean all
yum makecache
网易 阿里的源都不支持,要用中科大的
https://blog.csdn.net/byforson/article/details/95325381
安装教程
https://www.cnblogs.com/anxminise/p/9650206.html
设置下载超时时间
echo "timeout=120" >> /etc/yum.conf