Installation on CentOS
Install CentOS 5
My CentOS 5 installation is a DVD install with only the "Desktop - GNOME" group selected.
On restart, a number of questions (timezone/security level/etc) are asked. At this stage set the "SELinux" option to disabled. If you skip this step, then simply modify the /etc/sysconfig/selinux file and disable selinux from there. You will need to reboot before this takes effect, but its okay to wait until you have installed the kernel before doing this (just to save some time :)
Install the vserver kernel
I have found using Daniel's fedora kernel rpm's work great with CentOS 5, so I downloaded the relevent kernel RPMS files
wget -c http://rpm.hozac.com/dhozac/fedora/6/vserver/i386/kernel-2.6.20-1.2936.fc6.vs220.127.116.11.i686.rpm
Then install the kernel...
rpm -ivh kernel-2.6.20-1.2936.fc6.vs18.104.22.168.i686.rpm
Double check the grub file to make sure its the bootable kernel (/boot/grub/grub.conf). If all is okay we are ready to restart the server.
At this stage (before the reboot) I also modify the hosts sshd config file, so it doesn't listen to every interface on the server. This blocks any guests attempt to run sshd.
and add the line "ListenAddress 192.168.0.1"
Install util-vserver (from source via RPM)
At this stage I had to add some packages to my installation
sudo yum install rpm-build gcc-c++ e2fsprogs-devel beecrypt-devel doxygen tetex-latex wget ftp://rpmfind.net/linux/fedora/extras/5/i386/dietlibc-0.30-1.fc5.i386.rpm wget ftp://rpmfind.net/linux/fedora/extras/5/i386/dietlibc-lib-0.30-1.fc5.i386.rpm sudo yum localinstall dietlibc-0.30-1.fc5.i386.rpm dietlibc-lib-0.30-1.fc5.i386.rpm
Now we are ready to make the util-vserver rpm's
wget -c http://ftp.linux-vserver.org/pub/utils/util-vserver/util-vserver-0.30.212.tar.bz2 rpmbuild -tb util-vserver-0.30.212.tar.bz2
And finally, install the new rpms
sudo yum localinstall /usr/src/redhat/RPMS/i386/util-vserver*
Post installation steps
Make certain /proc entries visable (required every boot, so install the vprocunhide start script on boot)
sudo /sbin/chkconfig --add vprocunhid sudo /etc/init.d/vprocunhide start
Install a guest
As root, try the following to test your installation (this example installs a fedora core 6 guest)
sudo vserver testing01 build -m yum --context 4040 --hostname=test01.test.loc \ --interface eth0=eth0:192.168.101.101/255.255.0.0 -- -d fc6
If all goes well you now have a working setup :)