Jul 022012
ubuntu 12.04,改动很大。有时候你发现连机器的dns设置都不会。
/etc/resolv.conf 一般都是修改这个文件就可以。不过现在不行了。
https://help.ubuntu.com/12.04/serverguide/network-configuration.html#name-resolution
http://wiki.debian.org/NetworkConfiguration#The_resolvconf_program
http://ubuntuforums.org/showthread.php?t=1972424
最简单就是删除resolvconf
apt-get remove resolvconf
这样就和以前一样。你可以通过 /etc/resolv.conf 管理dns。
2012年7月19日更新
深入学习了一下ubuntu官方文档 https://help.ubuntu.com/12.04/serverguide/network-configuration.html
对于ubuntu 12.04日后的操作系统,dns的设置,推荐在网卡直接设置。
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.1.199.17
hwaddress ether 00:25:90:67:ce:64
netmask 255.255.255.0
network 10.1.199.0
gateway 10.1.199.1
dns-search chenshake.com
dns-nameservers 8.8.8.8
auto eth1
iface eth1 inet manual
up ifconfig eth1 up
注意是:dnsservers