Installing CentOS 5.4 on VMware Fusion 3

For those of us who have Macs, it is really useful to be able to run virtual machines loaded with other operating systems.  VMware Fusion 3 is one product that enables us to run another OS within Mac OS X.  One can even run Mac OS X (Snow Leopard or Leopard) Server in a virtual machine.

This article simply shows the sequence of steps taken to install CentOS 5.4, a Linux distribution based on an enterprise-grade OS (with the non-free parts not included) that has a good share of the Linux enterprise market.  We also show the settings used in VMware Fusion 3.

The Mac that is used here is a unibody aluminum MacBook (October 2008) with a 2.4 GHz Intel Core 2 Duo processor and 4 GB of DDR3 RAM.  It’s a speedy machine even if it has been superseded by the 13″ MacBook Pro.

We first specify the OS disc image for VMware to install from:

Specifying Disc Image for CentOS 5.4

VMware Fusion detects the OS correctly:

64-Bit CentOS Detected

64-Bit CentOS Detected

Initially, VMware Fusion automatically configures the virtual machine settings for you.  Later on we change these settings:

Default Settings For VM

Default Settings For VM

Changing the settings, we then have:

New Settings For VM

New Settings For VM

With the new settings, we can take advantage of the two cores of the CPU.  Note that, unlike the previous version of VMware Fusion, VMware Fusion 3 now shows multiple cores not as individual processors but as individual cores.  This is more obvious with OSes such as Microsoft Windows XP Home Edition which supports multi-core processors but not multiple sockets (you’ll need XP Professional for that).

With the VM configured, we start it and see the splash screen:

Splash Screen

Splash Screen

We press the <ENTER> key and proceed:

Prompt for Testing The Installation Disc/Image

Prompt for Testing The Installation Disc/Image

For the purpose of this article, we skip the test (we previously verified its signature anyway) but it is good to go through the disc for installation on production machines just to be sure.

Below, we see that the next step is the initialization of the Anaconda installer and X.  The installer detects a “vmware video card” and loads that for X.

Starting The Anaconda Installer and X

Starting The Anaconda Installer and X

In a few seconds, X starts up and we see the graphical installer:

The Graphical Installer

The Graphical Installer

We click on “Release Notes” to read what’s new or significant with this release of CentOS.

Release Notes

Release Notes

All we get though is a short version of the release notes with links to various informational documents.  For now, we do not click on any of them and just continue with the installation.

Language Choice for Install

For the purpose of this article, we choose English as the language for installation.

Keyboard Setup and Drive Formatting

We are using a U.S. English keyboard so that is selected.  Then, the installer detects that the partition table is not readable, prompting us to initialize it.  We select ‘Yes’.

Partitioning The Hard Drive

We simply use the default partitioning that the installer chooses and proceed to the next screen.

Network Configuration

For the network configuration, we use DHCP.  When our VM was configured, we chose NAT networking meaning that the OS is “behind” the host OS.  The guest OS (CentOS 5.4 in this case) gets its IP address from VMware and uses that to connect to the local network and the Internet.

Manually Selecting The Hostname

The hostname was chosen manually instead of relying on DHCP to assign it.  This is only for this case.  Your DHCP server might be configured to set the hostname as well — just ask the network/systems administrator about it.

Next, the time and date are configured and the timezone is selected:

Time Zone Selected

The installer then asks for the root/administrator password that is to be used.

Root Password

The packages are now selected.  We select both Gnome and KDE desktop environments just to see how they compare.  Normally, Gnome is selected as default.

Package Selection

We do not need the other packages:

Packages Not Installed

The installer then checks for dependencies for the selected packages (that are going to be installed).

Dependencies

We are prompted to begin installation and so we proceed:

Starting Installation

CentOS Install Begins

Transferring Disc Image

You can donate to the CentOS Project:

Donations, Anyone? :-)

Yum is useful in managing the packages of the system:

Yum

The software repositories:

Software Repositories

The CentOS Plus repository:

CentOS Plus Repository

Help With CentOS

Documentation

CentOS Wiki

Virtualization

Completed Installation

Server Rebooting: Splash Screen of Boot Up

A little more configuration is needed after the reboot:

Some More Configuration

We open up a number of ports needed for the installation to service clients with.

Firewall

We set SELinux to “Enforcing”:

SELinux

For our purpose, we do not enable Kdump:

Kdump

We check and set (if needed) the data, time, and timezone.  We also activate the use of the Network Time Protocol (NTP):

NTP

We now create a regular user.  We’ll add more later.

Create User

Clicking on “Use Network Login” gives us more options but we do not use them for now (i.e. leave them with their default values):

Network Login 1

Network Login 2

No additional CDs are used in our installation:

Additional Installation CDs

Finally, the login screen using gdm:

Login Screen Using gdm

First, we escape the login screen by using the key combination: Ctrl-Alt-F1 (Ctrl-Option-Fn-F1 on the MacBook).  We login as root, go to run level 3 (telinit 3), then run Xorg’s auto configuration function:

telinit 3: Kill the X Window Server

We then copy ~/xorg.conf.new to /etc/X11/xorg.conf and edit it, adding the Virtual configuration option as we did in OpenSUSE and Fedora:

Virtual

We then return to run level 5:

Telinit 5

The resulting login screen is now bigger (1680×960 pixels):

Login Screen 1680x960 pixels

Note that using sudo instead of logging in as root all the time is a better habit for security.  But first, you must be root to configure sudo and the user/group account(s) to be granted certain privileges.  Perhaps another article will discuss how to configure sudo.

A First Look at Fedora 12

A couple of days ago, Fedora 12 was released on the Internet.  We downloaded the x86_64 (64-bit) version of the distribution to check it out.  Once more, we installed the distribution in a virtual machine created using VMware Fusion 3 running on a 2.4 GHz MacBook with 4 GB of RAM.

VMware Fusion Settings

A disc file image of Fedora 12 was used to install the distribution on the virtual machine.  Installation was speedy.  Welcome Screen To InstallationAside from the default selection of packages, we chose to add more development tools to allow us to compile other programs manually.  We also added the OpenJDK development package after the install was done and after rebooting into the new system.

The default screen resolution was 800×600 pixels.  This was chosen probably because it was a safe setting for the video driver (vmware) selected.  However, we decided to increase the resolution to 1680×960 pixels by modifying /etc/X11/xorg.conf.  Like what we did with OpenSUSE 11.2, we added the line:

Virtual 1680 960

The steps to do this were the same.  First, put Fedora 12 to run level 3 (without X running).  Then, execute ‘Xorg -configure‘ to generate an xorg.conf file in root’s home directory.  Copy this new configuration file to /etc/X11/xorg.conf and edit the new file by adding the Virtual line above.  Run X using the command ‘startx‘ to see if the configuration works.  If it does, return to run level 5 to bring up the desktop login manager.

The login screen of Fedora is quite simple.  It uses the Gnome Desktop login manager:

Login Screen @ 1680x960

The default desktop is Gnome although you can get different “spins” of Fedora with KDE and other desktops as defaults.  Below are samples of the desktop running programs including Java applets courtesy of OpenJDK.

Desktop 1

Installing Software

We also got a Logitech Quickcam Pro 9000 webcam to work out-of-the-box with Fedora 12.  We first had to tell VMware to attach the device for Fedora to see it.

Webcam Working On Fedora 12 VM

Some Java apps running using OpenJDK.  Note that the OpenJDK installation in this VM is 64-bit.

Java Programs Running In Fedora

For now, that’s what we have on Fedora 12.  We’ll be back with more Linux articles.