不知道為了什麽,google都不讓“碰”了:
# ping www.google.com
ping: unknown host www.google.com
有人指點說要看這個文件:
/etc/resolv.conf
打開它看看:
# Generated by NetworkManager
# 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
是個自動生成的文件。按照它的指點到了network-scripts這棵樹下。
是ifcfg-eth0,還是ifcfg-lo?
先試第一個: 把網關地址加到後麵 “DNS1=192.168.2.1” 。
保存退出。
網絡還要重啟下:
#ifdown eth0
#ifup eth0
# ping www.google.com
PING www.l.google.com (66.249.80.104) 56(84) bytes of data.
64 bytes from lga15s03-in-f104.1e100.net (66.249.80.104): icmp_seq=1 ttl=57 time=24.5 ms
64 bytes from lga15s03-in-f104.1e100.net (66.249.80.104): icmp_seq=1 ttl=56 time=24.5 ms (DUP!)
64 bytes from lga15s03-in-f104.1e100.net (66.249.80.104): icmp_seq=1 ttl=57 time=25.4 ms (DUP!)
...........................................................
好了!還要找那個resolv.conf核對一下:
# Generated by NetworkManager
nameserver 192.168.2.1
一切正常了!菜鳥也可以睡覺了。。。