在执行curl时,突然发现这个报错,问题是之前完全没有出现过这样的情况。
故障描述:
root@localhost ~]# curl -k https://www.kkpan.com/
curl: (6) Could not resolve host: www.kkpan.com; Unknown error
You have new mail in /var/spool/mail/root
[root@localhost ~]# ping www.kkpan.com
ping: www.kkpan.com: Name or service not known
[root@localhost ~]# cat /etc/resolv.conf
nameserver 223.5.5.5
search localdomain
DNS223.5.5.5是由阿里巴巴提供的免费DNS服务器的IP地址;
果断直接修改resolv文件,改成114和谷歌的地址
[root@localhost ~]# cat /etc/resolv.conf
nameserver 114.114.114.114
nameserver 8.8.8.8
测试正常。。结果就不贴出来的。。