Failed to find download when executing yum install GCC
Ping www.baidu.com
Ping does not pass
Ping Baidu's ip:220.181.111.188 but can ping through
This proves to be a problem with DNS
Baidu after check to set the DNS need to run the command: vi/etc/resolv.conf
Add to:
NameServer 192.168.0.1
NameServer 192.168.0.1
However, after running the vi/etc/resolv.conf prompt:
# Generated by NetworkManager
Search an
# 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
So run Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Add to
# dns1=192.168.0.1
# dns2=192.168.0.1
# domain=lab.foo.com Bar.foo.com
Running Service Network restart
Find out or ping not pass
Run vi/etc/resolv.conf Discovery added nameserver missing
Find a solution after a network search:
1. #Remove Network Manager from startup service
Chkconfig Networkmanagermangager off
2. #Add Default Net Manager
Chconfig Network on
3. Stop NetworkManager First
Service NetworkManager Stop
4. #and then start Default Manager
Service Network start
5. #restart Network
Service Network restart
Reconfigure the DNS configuration file to restart the network
Ping www.baidu.com
Success
This article refer to Http://wenku.baidu.com/link?url= Hdebl7k6lihjid-zqwmihw5mkswm4d7ls8p-yrhb7igbpkylrmxnvo5sfxgds7bgwrn9v2ix5a5c9nbgmqq0dtjpsh1cib47_vqzxrduhcw
Linux DNS Settings failed