RedHat5.5的/etc/resolv.conf文件被复写的解决
公司RedHat5.5系统,配置了/etc/resolv.conf文件后重启网络服务,此文件内容就被复写了。经过查看红帽官方文档,给出以下解决办法。https://access.redhat.com/site/solutions/61921
问题主要原因是启用了networkmanager服务,个人觉得是此服务接管了原有的网络设置。
解决办法是配置networkmanager的配置文件。
1.创建一个脚本。vim /etc/NetworkManager/dispatcher.d/15-resolv
内容为:
# vim /etc/NetworkManager/dispatcher.d/15-resolv
#!/bin/bash
#
# Description : script to override default resolv.conf file
# with customized file.
cp -f /etc/resolv.conf.custom /etc/resolv.conf
2.设置文件权限
# chmod u+x /etc/NetworkManager/dispatcher.d/15-resolv
3.创建一个文件 vi /etc/resolv.conf.custom
nameserver xx.xx.xx.xx
options single-request-reopen
4.重启服务
service NetworkManager restart
相关推荐
圆圆的世界CSDN 2020-02-09
yonggeno 2019-12-28
RichardJason 2015-03-01
SlowWakler 2015-03-01
xujidong0 2014-11-03
gotowqj 2014-01-15
rootdream 2012-08-25
shutFuckingup 2010-09-25
xlb 2018-07-02
wuchangqian 2019-06-30
rootdream 2019-06-30
rootdream 2019-06-26
缘起 2019-06-21
xlb 2014-08-22
lethwei 2011-10-19