我正在尝试在centos 中安装resolvconf。
在 Ubuntu 中,我可以安装 resolvconf sudo apt-get install resolvconf
。
对于centos,我尝试做同样的事情,sudo yum install resolvconf
但我收到了消息No package found. Nothing to do
如何在 centos 中安装 resolvconf 。
我正在尝试在centos 中安装resolvconf。
在 Ubuntu 中,我可以安装 resolvconf sudo apt-get install resolvconf
。
对于centos,我尝试做同样的事情,sudo yum install resolvconf
但我收到了消息No package found. Nothing to do
如何在 centos 中安装 resolvconf 。
当使用“resolvconf -u”运行时,我试图让 resolvconf 在 /etc/resolv.conf 中添加两个额外的名称服务器。我的 /etc/resolvconf.conf 文件如下:
# Configuration for resolvconf(8)
# See resolvconf.conf(5) for details
resolv_conf=/etc/resolv.conf
# If you run a local name server, you should uncomment the below line and
# configure your subscribers configuration files below.
name_servers=1.1.1.1 1.0.0.1
# Mirror the Debian package defaults for the below resolvers
# so that resolvconf integrates seemlessly.
dnsmasq_resolv=/var/run/dnsmasq/resolv.conf
pdnsd_conf=/etc/pdnsd.conf
unbound_conf=/var/cache/unbound/resolvconf_resolvers.conf
当我运行命令“resolvconf -u”时出现问题,这是我得到的输出:
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
如果我在 name_servers 行中只指定一个 DNS,它就可以正常工作。我还尝试用“”包装 DNS 定义,但它仍然不接受它们。我在手册中找不到有关正确语法的任何信息。