vi /etc/resolv.conf
nameserver 1.2.4.8
nameserver 8.8.8.8
更换yum base repo
1)centos5.*的下载连接:
[root@bastion-IDC yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
2)centos6.*的下载连接:
[root@bastion-IDC yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
3)centos7.*的下载连接:
[root@bastion-IDC yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
vi /etc/yum/respos.d/epel.repo
将
enabled=1
改为
enabled=0
yum install ca-certificates
vi /etc/yum/respos.d/epel.repo
将
enabled=0
改为
enabled=1
此时yum已经恢复正常
参考:
https://www.cnblogs.com/kevingrace/p/6252659.html
https://blog.csdn.net/chao_1990/article/details/76959691