1. Install CentOS 6
A word of caution : IBM software does not support the use of CentOS. However, I use CentOS regularly, because it resembles Redhat Enterprise Server (it’s not the same though) and in general, information that’s valid for RHEL is also valid for CentOS. So this setup is not suited for production purposes, only for demo/trial/… etc.
I’m currently using CentOS 6.3 on VMWare Workstation 9 for my images.
Install CentOS 6.3 on VMWare Workstation
Download the netinstall or minimal iso from a CentOS mirror. You need to select a mirror close to your location, the links below are for your information only.
CentOS-6.3-x86_64-minimal-EFI.iso
CentOS-6.3-x86_64-netinstall-EFI.iso
You do not have to use the EFI version, you can also use the ‘normal’ version. And even though my host operating system is Ubuntu 12.04 32 bit, I can run 64 bit guest Operating systems. So with any modern hardware, you should create 64 bit Virtual Machines, no matter what your host OS is. This may require activating the virtualization options in your bios, btw.
Start VMWare Workstation (or your virtualization software of choice)
- Create a new virtual machine (CTRL-N)
- Select “Typical”
- Choose to install from ISO, and select the iso file you downloaded.
- Select “Cent OS 64”
- Choose a location and a name for your Virtual machine.
Accept the defaults for disk and hardware for now.
Start up the virtual machine, and the installation will begin.
If you selected the netinstall, you’ll need a url to enter.
For instance, this is the url I used :
ftp://ftp.belnet.be/packages/centos/6.3/os/x86_64/
This means you need to set the protocol to ftp, and enter values in the server and directory field :
ftp.belnet.be
ftp://ftp.belnet.be/packages/centos/6.3/os/x86_64/
Select your preferred disk layout , set the root password , and select the minimal option.
Install additional packages
After the initial install, it’s a good idea to update your installation :
as root:
yum update
yum install perl openssh openssh-clients
openssh-clients is needed so you can use scp. Not included in the minimal CentOS install
yum install ksh
ksh is required for DB2
yum install bc xorg-X11-xauth
Must be present for IBM Directory Server
yum install glibc.i686
prevents potential ld-linux.so.2 error
yum install gcc gcc-c++ glibc glibc-common compat-gcc compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel glibc-devel glibc-headers glibc-kernheaders libgcc
needed for most IBM products
yum install libstdc++ libstdc++.i686 libXp compat-libstdc++-33.i686 compat-db.i686 libXp.i686 libXmu.i686 libXtst.i686 pam.i686 libXft.i686 gtk2.i686 gtk2-engines.i686 compat-libstdc++-296
needed specifically for IBM HTTP Server - so may be a bit too much (these are mostly 32 bit libraries versions that need to be installed on a 64 bit system in addition to the 64 bit versions)
yum install libXaw.i686
prevents an AWT error
yum install libXp libXmu libXtst pam rpm-build elfutils elfutils-libs libXft
yum install system-config-firewall
tool to configure iptables firewall rules. I think it’s a better idea to keep iptables enabled, and define the rules you need then to disable the firewall altogether.
This can be done in 1 command (or in this case 2) , as root:
yum install perl openssh openssh-clients gcc gcc-c++ glibc glibc-common compat-gcc compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel glibc-devel glibc-headers glibc-kernheaders libgcc ksh bc xorg-x11-xauth libXp libXmu libXtst pam rpm-build elfutils elfutils-libs libXft
yum install glibc.i686 libXaw.i686 libstdc++ libstdc++.i686 libXp compat-libstdc++-33.i686 compat-db.i686 libXp.i686 libXmu.i686 libXtst.i686 pam.i686 libXft.i686 gtk2.i686 gtk2-engines.i686 compat-libstdc++-296
yum install system-config-firewall
Prepare SSH
Although I could use the VMWare interface to work with the Virtual Machines, I prefer to connect to them using an SSH terminal session (from my host machine). I use the default gnome terminal, another possibility is to use putty (available for Linux, Windows and I suppose Mac as well).
Connecting in a terminal has the advantages that :
- I can start multiple sessions to the same host
- I can use ssh keys to connect automatically, so I don’t have to enter passwords anymore
- copy/pasting works better from a terminal than from the VMWare workstation interface, I find
To prepare SSH, you need to generate keys for the root user :
login as root and run :
ssh-keygen
Accept all defaults ( don’t set a password)
Install vmware tools
Installing VMWare tools in only necessary if you run your CentOS on a VMWare virtualization platform. It is reallly usefull to do so, it offers a few indispensible advantages :
- time sync
- sharing the host’s file system
As root :
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
cd /tmp
tar xvzf /mnt/cdrom/VM*
cd vmware-tools-distrib
./vmware-install.pl
And follow the instructions, accepting the defaults works fine for me .
UDEV
UDEV is a pain in the ass if you work with copied virtual machines. You can remove the rule if you have problems starting the network interface eth0, although it will automatically be recreated on restart ….
rm /etc/udev/rules.d/70-persistent-net.rules
Your CentOS is now ready to install stuff on.