Environment:
VMware Os:centos Release 6.5
Dual network card Eth0 (connected to the public network 192.168.80.0), Eth1 (connected intranet 192.168.44.0)
Error:
Using Yum to update software times error
Error:cannot find a valid baseurl for repo:base
There was no problem using Yum before, and Yum was unable to use it after restarting the virtual machine today. This error is caused by DNS resolution, check/etc/resolv.conf, DNS becomes 192.168.44.1, after manual modification, use yum Normal, restart the network after/etc/ Resolv.conf again back to 192.168.44.1,yum and can not use, in the network card configuration file Ifcfg-eth0 and ifcfg-eth1, add peerdns=no (do not modify resolv.conf file), restart the network card, everything is normal.
In summary, resolv.conf is the DNS client configuration file, the NameServer keyword defines the IP address of the DNS server, the file can contain many nameserver addresses, the name server in the order of occurrence in the file, from top to bottom to find, The second one is found when the first nameserver is invalid.
Yum Error Error:cannot find a valid baseurl for repo:base