Today installs the Centosmini version under the virtual machine, the first thing after installation is Yum update
But there's a mistake: cannot find a valid baseurl for repo base base
Baidu has a half-day also not a very reliable, finally Google a bit, immediately came out.
The specific link here Http://unix.stackexchange.com/questions/22924/how-can-i-fix-cannot-find-a-valid-baseurl-for-repo-errors-on-centos
I am using one of the following:
cd/etc/sysconfig/network-scripts/
Then find the file that ifcfg begins with, open it up.
There are the following code in the first three lines, add the next two lines of DNS, keep and exit, and then continue to execute two ifdown and Ifup command, and then ping www.baodu.com Normal, there is no problem to update yum.
onboot=nonm_controlled=Nobootproto=dhcpDNS1=8.8.8.8DNS2 =4.2.2.2
Restart the network interface
Ifdown eth0ifup eth0
CENTOS7 cannot find a valid baseurl for repo base