Sunday, April 26, 2009

CentOS 5.3 on VirtualBox

CentOS 5.3 was released last month, and I finally got around to adding that to the list of virtualized OSs I have running on VirtualBox.

Install was easy as usual. Since I again installed a handful servers and development tools, along with Japanese Language Support, I ended requiring all 6 of the CentOS 5.3 install ISO image files. No need to burn them to CD-ROM, just mount the files using Devices -> Mount CD/DVD-ROM in the VirtualBox main window menu.

Did the normal preflight check: ensured that SELinux is on and enforcing (you can switch this off if all you're doing is developing locally, but it helps to understand how SELinux works if you will be using it in production); disabled services not needed when running virtually (anacron, bluetooth, cups, hidd, pcscd, xfs); double-checked to see that root access is disabled for sshd; and I only open ports for SSH and HTTP/HTTPS in iptables (again, you can always configure more open ports as needed, like for accessing a database or whatnot).

Lastly, I installed the VirtualBox guest additions for Linux. Nothing special here, just follow the instructions in the User Manual. The long and short of follows below.

First, we install the packages necessary for installing the Linux guest additions:


# yum install gcc -y
# yum install kernel sources -y
# yum install kernel-devel -y
# shutdown -r now


Next, mount the VBoxGuestAdditions.iso file per section 4.3.1 Installing the Linux Guest Additions in the User Manual.

Then, all that's left is:

# mkdir /tmp/cdrom
# mount /dev/cdrom /tmp/cdrom
# sh ./VBoxLinuxAdditions-x86.run
# shutdown -r now


Hey, presto! In the messages displayed in the console at startup, you will see that VirtualBox Additions is also starting up now. Good to go. And not that much different from my previous post on guest additions with CentOS 5.1.

I should also add that there wasn't any need to first install gcc and dkms, since those packages were already included in the installation. Caveat emptor.

No comments: