CentOS 6.4无法修改resolv.conf文件的问题

在/etc/resolv.conf中增加dns地址,重启网卡服务后,文件内容被清空。
解决办法:
关闭NetworkManager服务
/etc/init.d/NetworkManager stop
修改/etc/resolv.conf
vim /etc/resolv.conf
修改或新增dns地址:
nameserver xxx.xxx.xxx.xxx
保存退出
重启网卡
/etc/init.d/network restart
避免重启服务器后配置被清空
chkconfig NetworkManager off

你可能感兴趣的:(CentOS 6.4无法修改resolv.conf文件的问题)