For a nice VM I needed a Linux server, but no need for a GUI, so went for CentOS.
Installed fine, but no networking. How do I install that? Turns out, it is installed, just disabled by default:
Find the line ONBOOT and change to yes:
UUID=some guid string
Then just restart networking at you should be up and running:
service network restart
Test by entering ifconfig and you should see the loopback address.
If you need to install Guest Additions on VirtualBox:
yum install gcc make kernel-devel
mount /dev/scd0 /media/cdrom
Had a routing issue the other day, and I was remotely trying to forward a port to a device. I didn’t know the MAC address of the device, and my Home Hub was insisting on that information for the forward destination. I knew the IP address, so there is a simple Windows command to get the MAC address from the IP address:
arp -a <ip_address>
arp -a 192.168.1.70
Easy. This command works in Windows as well as Linux! Well theres a thing… It also works in Mac, but you drop the -a parameter:
If you have just set up a new Centos server and found that the network isn’t functioning, and you have no IP address for it then fear not, its a ‘secure’ default for Centos to not enable networking until you are ready to do so.
sed -i -e 's@^ONBOOT="no@ONBOOT="yes@' ifcfg-eth0
If this doesn’t help, then double check the filename in that folder. You may have ifcfg-lo instead.
More help here: http://wiki.centos.org/FAQ/CentOS6#head-b67e85d98f0e9f1b599358105c551632c6ff7c90