H-Sphere Documentation Sysadmin Guide

 

Upgrading H-Sphere VPS Host

(to HS VPS version 1.3-6.7)

 

Related Docs:   VPS Host Installation • FreeVPS Documentation

This document contains general procedure of upgrading VPS host to the latest H-Sphere VPS 1.3-6.7 version.

To check what H-Sphere VPS version is installed, run under root:

# rpm -qa | grep hsphere-vps
IMPORTANT:
• H-Sphere VPS requires correct FreeVPS kernel and FreeVPS tools to be installed. Otherwise, it will not work;
• To update H-Sphere VPS packages, DO NOT use the rpm -U command. Instead, uninstall the old packages and then install the new ones with the rpm -i command.

 

Required Packages

The following packages should be installed:

  • Kernel, version 2.4.21-15.0.4.EL, patched to support VPS:
    kernel-freevps-1.4 and up

    You need to choose the package suitable for your platform, processors count, memory capacity kernel.
    Note: If your server hardware is not standard, you will probably also need to install the kernel-freevps-unsupported package (not trusted by RedHat).

    The latest kernel releases can be found in the FreeVPS download area.

  • FreeVPS tools:
    freevps-tools-1.3-17 and up

  • H-Sphere VPS scripts:
    hsphere-vps-1.3-6.7

    Note:We provide the hsphere-vps package for the following OSs:
    - Red Hat Linux release 7.3 with Perl v5.6.1 installed.
    - Red Hat EL 3, CentOS 3.x, White Box EL 3 with Perl v5.8.0 installed.
    If you need to install this package on this version of Linux's with other versions of Perl, you need to rebuild hsphere-vps package.

    To build the latest hsphere-vps scripts package, please read Building H-Sphere VPS.

  • H-Sphere script runner:
    hsphere-script-runner-1-8

  • Red Hat Linux release 7.3

    • New modutils 2.4.25-11.EL or higher:
      modutils-2.4.25-11.EL
      modutils-devel-2.4.25-11.EL

    • New SysVinit, pam, pam-devel, vixie-cron packages:
      SysVinit-2.85-4
      pam-0.75-51
      pam-devel-0.75-51
      vixie-cron-3.0.1-74

    • H-Sphere hsphere-sudo package:
      hsphere-sudo-1.6.3p5

    Red Hat EL 3, CentOS 3.x, White Box EL 3:

    • H-Sphere hsphere-sudo package:
      hsphere-sudo-1.6.7p5-0

     

    Upgrade Procedure

  1. Suspend all VPS before the server reboot:

    # cd /hsphere/shared/scripts
    # ./vps-suspend.pl -a
  2. Download the packages and put them into a separate directory, for example, to /root/inst:

    Red Hat Linux release 7.3:

    Kernel packages are available here: http://www.freevps.com/download/rpms/RH_73

    # wget http://www.freevps.com/download/rpms/RH_73/modutils-2.4.25-11.EL.i386.rpm
    # wget http://www.freevps.com/download/rpms/RH_73/modutils-devel-2.4.25-11.EL.i386.rpm
    # wget http://www.freevps.com/download/rpms/RH_73/SysVinit-2.85-4.i386.rpm
    # wget http://www.freevps.com/download/rpms/RH_73/pam-0.75-51.i386.rpm
    # wget http://www.freevps.com/download/rpms/RH_73/pam-devel-0.75-51.i386.rpm
    # wget http://www.freevps.com/download/rpms/RH_73/vixie-cron-3.0.1-74.i386.rpm

    # wget http://www.freevps.com/download/freevps-tools/RH_73/freevps-tools-1.3-17.i386.rpm

    # wget http://www.psoft.net/shiv/HS/VPS/RH73/hsphere-vps-1.3-6.7.noarch.rpm
    # wget http://www.psoft.net/shiv/HS/RH73/hsphere-script-runner-1-8.rpm
    # wget http://www.psoft.net/shiv/HS/RH73/hsphere-sudo-1.6.3p5.rpm

    Red Hat Enterprise Linux ES release 3, CentOS 3.x, White Box EL 3::

    Kernel packages are available here: http://www.freevps.com/download/rpms/RH_EL

    # wget http://www.freevps.com/download/freevps-tools/RH_EL/freevps-tools-1.3-17.i386.rpm

    # wget http://www.psoft.net/shiv/HS/VPS/RHEL/hsphere-vps-1.3-6.7.noarch.rpm
    # wget http://www.psoft.net/shiv/HS/RHES3/hsphere-script-runner-1-8.rpm
    # wget http://www.psoft.net/shiv/HS/RHES3/hsphere-sudo-1.6.7p5-0.rpm
  3. Check the VPS build:

    # cat /proc/vservers/setup | grep "freevps build"
    You will get something like this:
    freevps build 1089101812
    If your freevps build is less than 1114360337, you need to update your kernel.
  4. Check your kernel release.

    # uname -r

    You will get something like this:

    2.4.18-freevps-1.1-0

    Find out kernel packages installed:

    # rpm -qa | grep kernel

    You will get, for example:

    a) Red Hat Linux release 7.3:

    kernel-2.4.21-3
    kernel-freevps-1.1-0

    b) Red Hat EL 3, CentOS 3.x, White Box EL 3::

    kernel-2.4.21-4.EL

    Therefore, the old kernel package to be uninstalled is kernel-freevps-1.1-0. However, beforehand you need to install the new kernel as described below.
    Note: Uninstall old FreeVPS kernels only!

  5. Check the H-Sphere VPS version:

    # rpm -qa | grep hsphere-vps
    You will see something like this:
    hsphere-vps-x.xx-x
    where x.xx-x is the old hsphere-vps tools/scripts version and release number.
  6. Uninstall the old H-Sphere VPS scripts:

    # rpm -e hsphere-vps-x.xx-xx
  7. Check the FreeVPS tools version:

    # rpm -qa | grep freevps-tools
    freevps-tools-x.xx-x
    where x.xx-x is the old freevps-tools version and release number.
  8. Uninstall the old FreeVPS tools:

    # rpm -e freevps-tools-x.xx-xx
  9. Check the Vserver version (skip this and the next step if you are upgrading from H-Sphere VPS 1.2 and up):

    # rpm -qa | grep vserver
    You will see something like this:
    vserver-x.xx-x
  10. Uninstall the Vserver tools, they are not required in new version of VPS:

    # rpm -e vserver-x.xx-xx
  11. Install the packages in the following sequence:
    Note: You need to satisfy all dependences during installation.

    1) (RH 7.3 only) Update modutils:

    # rpm -Uvh modutils-2.4.25-11.EL.i386.rpm modutils-devel-2.4.25-11.EL.i386.rpm

    2) (RH 7.3 only) Update SysVinit, pam, pam-devel, vixie-cron packages:

    # rpm -Uvh SysVinit-2.85-4.i386.rpm pam-0.75-51.i386.rpm pam-devel-0.75-51.i386.rpm vixie-cron-3.0.1-74.i386.rpm

  12. Install the new kernel package.
    Note: Skip this step if you have the latest kernel release.

    1) Install the new kernel package kernel-freevps-1.4-x.

    2) Go to the /boot directory to check if the kernel update takes place:

    # cd /boot
    # ls -la

    The new kernel is at least vmlinux-2.4.21-freevps-1.4.
    The old one may look like:

    a) Red Hat Linux release 7.3:
    vmlinuz-2.4.18-3
    vmlinux-2.4.18-freevps-1.1-0
    b) Red Hat EL 3, CentOS 3.x, White Box EL 3:
    vmlinux-2.4.21-4.EL

    3) Modify the boot loader, (a) for GRUB or (b) for LILO:

    (a) GRUB: Edit the /boot/grub/grub.conf configuration file:

    Note: GRUB loader my automatically update it's configs. In that case you need to change default boot image.

    # vi /boot/grub.conf

    The file should look similar to this:

    Red Hat Linux release 7.3:

    default=0
    timeout=10
    splashimage=(hd0,0)/grub/splash.xpm.gz
    title Red Hat Linux (2.4.21-freevps-1.4)
                  root (hd0,0)
                  kernel /vmlinuz-2.4.21-freevps-1.4 ro root=/dev/sda5
                  initrd /initrd-2.4.21-freevps-1.4.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
    

    Red Hat EL 3, CentOS 3.x, White Box EL 3:

    default=0
    timeout=10
    splashimage=(hd0,0)/grub/splash.xpm.gz
    title Red Hat Enterprise Linux ES (2.4.21-freevps-1.4)
                  root (hd0,0)
                  kernel /vmlinuz-2.4.21-freevps-1.4 ro root=/dev/sda5
                  initrd /initrd-2.4.21-freevps-1.4.img
    title Red Hat Enterprise Linux ES (2.4.21-4.EL)
                  root (hd0,0)
                  kernel /vmlinuz-2.4.21-4.EL ro root=/dev/sda5
                  initrd /initrd-2.4.21-4.EL.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 will look like:

    Red Hat Linux release 7.3:

    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/vmlinux-2.4.21-freevps-1.4 
            label=linux_patched
            initrd=/boot/initrd-2.4.21-freevps-1.4.img
            read-only
            root=/dev/sda5
    

    Red Hat EL 3, CentOS 3.x, White Box EL 3:

    prompt
    timeout=50
    default=linux_patched
    boot=/dev/sda
    map=/boot/map
    install=/boot/boot.b
    message=/boot/message
    linear
    image=/boot/vmlinux-2.4.21-4.EL
            label=linux
            initrd=/boot/initrd-2.4.21-4.EL.img
            read-only
            root=/dev/sda5
    image=/boot/vmlinux-2.4.21-freevps-1.4 
            label=linux_patched
            initrd=/boot/initrd-2.4.21-freevps-1.4.img
            read-only
            root=/dev/sda5
    

    Step 2: Type lilo to apply changes:

    # lilo

    You will see the following lines:

    Added linux
    Added linux_patched *

    4) Reboot the server:

    # shutdown -r now

    5) Check if the kernel update takes effect:

    # uname -a

    If the kernel version is 2.4.21-freevps-1.4, the kernel is updated successfully.

  13. After the new kernel installation is complete, uninstall the old kernel which version was defined in Step 4.
    Note: You need to uninstall old FreeVPS kernels only!
    For example, if kernel is kernel-freevps-1.1-0, run:

    # rpm -e kernel-freevps-1.1-0

  14. Install generic FreeVPS tools:

    # rpm -ivh freevps-tools-1.3-17.i386.rpm

  15. Install new H-Sphere VPS tools:

    # rpm -ivh hsphere-vps-1.3-6.7.noarch.rpm

  16. Run update script:

    # cd /hsphere/shared/scripts/
    # ./vps-update.pl

    and follow the script instructions step by step.

  17. Run configuration script:

    # ./vps-configure.pl

    and follow the script instructions step by step.

  18. Resume suspended VPS:

    # cd /hsphere/shared/scripts
    # ./vps-resume.pl <vps_name>

    where <vps_name> is a suspended VPS server name.

    To resume all suspended VPS servers, run:

    # ./vps-resume.pl --all


Related Docs:   VPS Host Installation • FreeVPS Documentation





User comments
No comments for this page.
Add comment


Home   Products   Services   Partners   Support   News   Contact   Forum
© 2020 psoft.net
All rights reserved.