如果有网络,DNS也能用,那么直接很好解决,步骤如下:
1. 有wget
直接参考换源链接即可
执行:mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
然后:wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
2. 无 wget
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
直接访问:http://mirrors.aliyun.com/repo