高防服务器维护服务器时,运行了yum clean。
然后悲催的事情发现了,再次运行yum update时发现出现了无法解析dns的提示。
然后我ping了下google.cN,发现也是ping不通。
目前为止,确定肯定是DNS的问题。
然后我查看了, /etc/resolv.conf文件,(nameserver 8.8.8.8 nameserver 8.8.4.4)里面DNS配置正常。
因为服务器的系统是CentOS7,所以我尝试关闭NetworkManager,然后重启网络。结果依然是解析错误。
经过一些国外论坛的案例,我尝试关闭了防火墙。
关闭防火墙后,DNS解析恢复了正常。
期间出现的错误提示:
ping错误:
ping: Name or service not known
yum更新或安装错误:
Yum update error: Could not retrieve mirrorlist
进行的操作:
vi /etc/resolv.conf
vi /etc/sysconfig/network-scripts/ifcfg-eth0
vi /etc/nsswitch.conf
最终解决办法:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
systemctl stop iptables.service #停止iptables
systemctl disable iptables.service #禁止iptables开机启动
购买使用一诺网络国内高防服务器,可以极大降低初创企业、中小企业以及个人开发者等用户群体的整体IT使用成本,无需亲自搭建基础设施、简化了运维和管理的日常工作量,使用户能够更专注于自身的业务发展和创新。电信高防服务器低至259元/月,购买链接:https://www.enuoidc.com/vpscn.html?typeid=5