Install the packages in the following sequence:
1) Update modutils:
# rpm -U modutils-2.4.18-3.7x.i386.rpm modutils-devel-2.4.18-3.7x.i386.rpm
2) Install the new kernel package:
# rpm -ivh kernel-2.4.18-27.7.vserver.i386.rpm
Go to the /boot directory to check if the kernel update takes place:
# cd /boot
# ls -la
The new kernel is vmlinuz-2.4.18-27.7.vserver. The old one would look like vmlinuz-2.4.18-3.
3) Modify the boot loader, (a) for GRUB or (b) for LILO:
(a) GRUB: Edit the /boot/grub/grub.conf configuration file:
vim /boot/grub.conf
The file should look like this:
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-27.7.vserver)
root (hd0,0)
kernel /vmlinuz-2.4.18-27.7.vserver ro root=/dev/sda5
initrd /initrd-2.4.18-27.7.vserver.img
title Red Hat Linux (2.4.18-3)
root (hd0,0)
kernel /vmlinuz-2.4.18-3 ro root=/dev/sda5
initrd /initrd-2.4.18-3.img
default=0 means that GRUB would take the first title record as the boot image, i.e., our new kernel.
GRUB loader would update the kernel automatically after reboot.
(b) LILO:
Step 1: Modify the lilo.conf configuration file:
# vi /etc/lilo.conf
Copy and paste the kernel image settings lines and change the kernel number and the label parameter.
Change the default kernel loading parameter to the new kernel label name.
Important! Do not delete the old kernel image settings! If you delete these lines and
something goes wrong with the new kernel installation, your system would not start!
After these changes, lilo.conf would look like:
prompt
timeout=50
default=linux_patched
boot=/dev/sda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear
image=/boot/vmlinuz-2.4.18-3
label=linux
initrd=/boot/initrd-2.4.18-3.img
read-only
root=/dev/sda5
image=/boot/vmlinuz-2.4.18-27.7.vserver
label=linux_patched
initrd=/boot/initrd-2.4.18-27.7.vserver.img
read-only
root=/dev/sda5
Step 2: Type lilo to apply changes:
# lilo
You will see the line:
Added linux_patched *
4) Check the partition by the df command. It may look like this:
/dev/sda5 381139 102351 259110 29% /
/dev/sda1 46636 13584 30644 31% /boot
/dev/sda3 782696 16428 726508 3% /home
none 63316 0 63316 0% /dev/shm
/dev/sda2 2158416 814668 1234108 40% /usr
/dev/sda7 256667 25889 217526 11% /var
/dev/sdb1 40241880 328280 37869360 1% /hsphere/local/vservers
Partition where the virtual servers would run is /hsphere/local/vservers. You should provide enough space on it.
5) Reboot the server:
# shutdown -r now
6) Check if the kernel update takes effect:
# uname -a
If the kernel version is 2.4.18-27.7.vserver, the update is performed successfully.
7) Install the vps package (x.xx-x is the release version):
# rpm -ivh hsphere-vps-x.xx-x.i386.rpm
8) Check if the vps server is installed:
# ls -la /usr/sbin/vserver
In the /hsphere/local/vservers directory, separate folders for all virtual servers would be located.
9) RedHat installation RPMS should be available on your server.
If you don't have this directory on the server, mount the directory on CD-ROM or another server, or copy the packages
to a certain directory from the installation CD or from another place.
For example, mount CD-ROM on another server to the target directory:
mount -t nfs domain_name_or_ip:/mnt/cdrom/RedHat/RPMS target_mount_directory
For a permanent access to the RPMS directory on another server, add the following automount line to /etc/fstab:
domain_name_or_ip:source_mount_directory target_mount_directory nfs defaults 0 0
Then, mount to the target directory:
# mount target_mount_directory
10) Run the VPS configuration script:
# /hsphere/shared/scripts/vps-configure.pl
If your installation was successful, you'll see information about Virtual Private Server build,
for example (build 1049796935):
Virtual private server build 1049796935 found. [OK]
With the further steps, you'll perform base configuration for all your VPSs.
The default values are enclosed in square brackets '[ ]'. To accept them, press <ENTER>.
a) You must point to all Virtual Private Servers home directory which you created in step 4:
Please point to the directory where all Virtual Private Servers will be stored.
Make sure it has enough disk space!
The default is: [/hsphere/local/vservers]
b) On the next step, the script tries to find this host's gateway. To accept the suggested value,
simply press Enter. Otherwise, enter a different gateway's IP:
Gateway will be used for routing by VPSs:[192.168.114.1]
c) On this step, the script tries to find this host's network device. To accept the suggested value,
press Enter. Otherwise, enter a different device name:
Host's ethernet device will be used for VPSs:[eth0]
d) Every virtual server should have its own "virtual" net card. It is recommended to leave the same
name as for the network card:
VPSs will be used alias of ethernet device: [eth0]
e) You should specify the directory with the full set of RPMS copied or mounted on the previous
step. If your RPMS are located in the default directory (/home/RedHat/7.3/RedHat/RPMS), just press
Enter, otherwise, type the actual path to the RPMS directory:
Please specify where Linux RedHat 7.3 installation RPMs are located.
The default is: [/home/RedHat/7.3/RedHat/RPMS]
f) Next, specify if all VPSs will start at system reboot. Type 'y', 'yes' or press Enter for YES.
If you choose 'no', none of your VPSs will be started automatically, and you will have to resume
every individual VPS manually in the control panel after the system reboot:
Would you like all VPSs to start at physical server startup [y/n]?
g) You can install additional packages for your VPSs such as: gcc compiler, perl interpreter,
apache web server:
Would you like to install additional packages such as: "gcc perl web" [y/n]?
At this point, the script will finish the configuration with the following notification (see configuration
scripts here):
Writing to crontab: vps-cron.pl [OK]
Writing to crontab: vps-cron-traf.pl [OK]
Changing chkconfig... [OK]
In the end, you'll be prompted to save the changes you have made:
Save your changes [y/n]?
For more options run:
# /hsphere/shared/scripts/vps-configure.pl --help