CentOS 6 in VMWare 4
Here’s a quick summary of installing CentoOS 6 into VMWare Player 4. This summary isn’t for beginners, so I’m not going to mention the “obvious”…
First, my environment: I’m running Windows 7 as the host on an Intel dual-core machine with 8Gb RAM, on which I’ve installed the free VMWare Player version 4, and I have downloaded the DVD ISOs of the latest CentOS 6 distribution. Player 4 will happily run VM images created for Player 3, so if you are still on 3 then now is the time to upgrade.
Run Player and at the main window you get the option to run existing VMs or create a new one. Create a new VM with at least 2 Gb RAM (the minimum would be around 1Gb, but I find this limiting).
Mount the first Centos ISO as the CD/DVD drive for the new VM, which will start the installation when you boot for the first time. You don’t need the second ISO for most installations, such as installing CentOS as a Web server.
Use the “manual install” option (i.e. install the OS later) instead of the Easy Install option, because the easy approach doesn’t allocated enough space in /boot to do an OS upgrade, which is presumably the first thing you will want to do after installing the OS.
After creating the VM, boot it to start the CentOS installation. When you get to the part where you are given various options for how to assign the drive space, choose the option to erase the entire disk. This will give you a good volume arrangement, but if you have specific requirements (e.g. larger swap), use the DIY option instead.
The CentOS installation sequence also gives you the option to select your software packages according to the intended use. I mainly use CentOS as a Web server, which gives me the minimum software collection. Unfortunately, the Web server option doesn’t include a GUI interface (e.g. Gnome). I resolve this by adding the missing bits after the installation process has completed, as follows:
As root, issue the following commands:
- yum groupinstall “X Window System”
- yum groupinstall “Desktop”
- yum install xorg-x11-fonts-Type1
I find a browser is an essential test tool for a Web server, so I like to add “yum install firefox” to this list.
Once the GUI is installed, use “startx” to launch it. If you are logged in as root, Gnome will complain that running as root can lead to problems.
Finally, edit /etc/inittab and change the initial run level to 5 (instead of 3), save the file and reboot:
Interestingly, after adding the GUI, when you reboot the server, the visual installation process continues once the GUI is active. If you don’t install the GUI, you don’t get to see these final steps. One of these steps is the creation of a non-root account, which is the one that the server will expect you to use under normal circumstances.
The VMWare Player at some stage will ask you to download and install VMWare tools. You should let it download the tools during the early stages, but don’t install the tools until later when you have logged into the GUI as a non-root user. You will still need to provide the root password to install the tools.
If you intend to use Tomcat (which is installed as part of the “Web server” configuration), you will need to fix a problem in the log permissions. A quick fix is: chmod o+w /var/log/tomcat6
Categorised as: Operating Systems