CentOS networking not active after installation
I needed to install a CentOS 6.4 server in a VM and after installing I was not able to hit anything on the Internet, or any network for that matter. When I tried using the yum packages manager I received the error “Couldn’t resolve host ‘mirrorlist.centos.org…” and I was at a loss on what to do next. I was not able to ping anything.
This led me to look into the networking and and upon opening the /etc/resolv.conf I found it totally empty. So I then opened /etc/sysconfig/network-scripts/ifcfg-eth0 and found the issue. The line “ONBOOT” was set to “no”.
The complete file /etc/sysconfig/network-scripts/ifcfg-eth0 after I altered it: (NOTE: the only thing I altered was the ONBOOT flag.)
DEVICE=eth0 HWADDR=09:00:27:D7:61:8D TYPE=Ethernet UUID=q93perfj-earf-ewrf-wqer-546877145475 ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=dhcp
After changing “ONBOOT” to “yes”, then rebooted for the configuration to take effect, all is good now. I probably could have simply done a networking restart, but reboot on a fresh system was pretty fast.