CentOS: The freshmaker

Are you bored with your slick Windows 7 or OSX GUI? Have Ubuntu's cutting-edge package updates got you down? Do you like installing archaic Enterprise editions of Linux just for fun? CentOS might be right up your alley. This is a brief tutorial on how to install CentOS within VirtualBox. You'll need a few hours to kill, and a working VirtualBox installation. (I won't go into the details of how to install VBox; it's pretty easy, and besides, if you're thinking of installing CentOS for fun, you probably already have it.)

So, you have a choice of installation media. Option A: Download 5 GBs worth of .iso images. Option B: Download a 10 MB "net install" image, then install just what you need over the network. This is pretty much a no-brainer. Grab the netinstall iso for i386 (32-bit) or x86_64 (64-bit) depending on what kind of engine you got in that there racecar. Fire up VBox and do:

  • New machine (Ctrl+N)
  • Name: CentOS
  • Operating system: Linux
  • Version: Red Hat
  • Base memory: As much as you can spare
  • Create new hard disk
  • Dynamically expanding storage
  • Size: As much as you can spare (at least 8 GB)

Select the new machine and press Start. When the First Run Wizard prompts for installation media, click the folder icon. You should see a tab of CD/DVD images, probably including some .iso files if you've installed other OSes in VBox. Click "Add", browse to where you saved the netinstall.iso file, select it and press Open. Back in the CD/DVD tab, select the netinstall.iso and press Select. Click Next, then Finish. The virtual machine should start up with a boot: prompt. Press Enter to start the installation.

Shortly, you'll get a text-based installer that prompts for some basic options such as Language and Keyboard type. When you get to the "Installation Method" prompt, choose "HTTP" and hit OK. Next you'll be asked for TCP/IP configuration options--just leave these at the default, arrow down to OK and press Enter. On the HTTP Setup page, you'll be asked for a server name and directory. These are where the net installer will fetch packages for installation. You can use any of the available mirrors that provide packages for the version you're installing, or just go with the main CentOS vault:

  • Web site name: vault.centos.org
  • CentOS directory: /5.5/os/i386 (or /5.5/os/x86_64)

Enter those and hit OK. Eventually, you'll be taken to a GUI screen with the CentOS logo and a "Next" button. Hit Next, and you'll be prompted to initialize your new virtual disk. Unless something looks wonky, go ahead and click Yes. After this completes, you'll be informed that your hard drive needs to be partitioned. Unless you're an expert knob twiddler when it comes to partitions, just leave the defaults and click Next. On subsequent screens you can specify network settings, declare what time zone you're in, and set a root password.

The next choice you'll have to make is what kind of environment you want to have. You can pick Gnome or KDE GUIs, and extra stuff like Virtualization and Clustering. Make any changes you want here, or just leave it alone and click Next. From here on out, it should be pretty self-explanatory. Be prepared to wait a couple of hours, especially if your internet connection is anything short of magnificent.

Once it's installed, it's time to reboot. Go up to the "Devices / CD/DVD Devices" menu in VBox and unmount the installation .iso (otherwise it'll just try to install again when you reboot). Once you get logged in, it may tell you about some upgrades--you can go ahead and do those, but be prepared to wait another couple of hours.

There's one last wrinkle; if you've used VBox before, you've probably become quite enamored of the VBox guest additions. This is what allows your virtual OS to do cool things like automatically fill up the VBox window, have seamless mouse integration, and share network devices with your host OS. Installing them requires a couple extra steps, however. Here's how to make it happen:

  • Go to the VBox "Devices" menu, and click on "Install Guest Additions"
  • In the CentOS desktop, open a terminal window (Applications / Accessories / Terminal)
  • Become root: su - root
  • Install some things you'll need in order to build kernel modules: yum install gcc kernel-devel
  • Change to the guest additions folder: cd /media/VBOXADDITIONS_3.2.whatever
  • Run the guest installer: ./VBoxLinuxAdditions-amd64.run or ./VBoxLinuxAdditions-x86.run

When this is done, reboot CentOS. When you login the next time, your mouse should be integrated seamlessly, and the CentOS desktop will fill up your VBox window. What will you do with this newfound power? That's entirely up to you, and I take no responsibility for it. Enjoy!


Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Each email address will be obfuscated in a human readable fashion or (if JavaScript is enabled) replaced with a spamproof clickable link.

More information about formatting options

This question tests whether you are a human visitor, to prevent automated spam submissions.
Question text provided by textcaptcha.com