linux - resolv.conf 在重新启动时被重写

标签 linux unix dns fedora-21

我正在配置 Fedora 21 服务器,并根据以下 LINK 设置静态 IP 和 DNS

我正在使用

编辑文件
vi /etc/resolv.conf

然后将我的 dns 就像那里提到的那样。 一切都工作得很好。 但在我重新启动后,该文件被其原始内容覆盖:

# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com

发生了什么事以及如何阻止这种情况发生?

最佳答案

NetworkManager 正在覆盖它。您可以将其关闭并进入“手动”模式,那里有一些教程:http://xmodulo.com/disable-network-manager-linux.html

关于linux - resolv.conf 在重新启动时被重写,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28860655/

相关文章:

linux - 在不挂载的情况下读取 cgroups 数据

linux - 根据条件复制目录结构的 Shell 脚本

unix - 为什么有用户上下文和内核上下文... unix

firebase - 无法将自定义域添加到 firebase

Python 调用系统程序不起作用

python - 在使用 bash 命令的 python 脚本方面需要帮助

linux - 如何使用 awk 显示所有行,但在第二个字段中有条件?

dns - Jboss 域部署报告错误 : no deployment content with hash XXXX is avaiable in the deployment content repository

configuration - 更改 Thomson TG585 Cytanet 路由器的 DNS

java - 为 Hadoop 安装格式化 namenode