正在解析主机 失败:未知的名称或服务。 wget: 无法解析主机地址
It's probably better to have your DNS server be able to resolve 'puppet' to the right address, and either to have your DHCP server hand out the DNS nameserver address and search list or else (if you have static IP addresses) to have something like the following in /etc/network/interfaces.
iface eth0 inet static
address 192.168.3.3
netmask 255.255.255.0
gateway 192.168.3.1
dns-search example.com
dns-nameservers 192.168.3.45 192.168.8.10
But if you do want to do it via the resolvconf configuration files you will want to edit/etc/resolvconf/resolv.conf.d/base. In that file, put in your info as you would in resolv.conf.
nameserver 192.168.1.XXX
Then tell resolvconf to regenerate resolv.conf.
sudo resolvconf -u
本文详细介绍了如何通过调整DNS服务器设置和resolv.conf文件来解决主机解析失败的问题,包括静态IP地址配置和动态DNS配置方法。
3万+

被折叠的 条评论
为什么被折叠?



