修改repos源及DNS(No more mirrors to try.)

修改yum源

  1. mkdir -p /etc/yum.repos.d/repobak/
  2. mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/repobak/
  3. curl -o /etc/yum.repos.d/163.repo http://59.111.0.251/.help/CentOS7-Base-163.repo

修改DNS

  1. echo "nameserver 114.114.114.114">>/etc/resolv.conf
  2. 如果还不行的话,说明此文件中有其他的干扰的nameserver,注释掉其他的nameserver就可以正常解析了
  3. 测试ping baidu.com

你可能感兴趣的:(修改repos源及DNS(No more mirrors to try.))