VPS Host Installation

(HS VPS version 1.4-1 - private testing)

 

Related Docs:   VPS Configuration (Admin Guide) VPS Upgrade (Private) VPS Scripts • FreeVPS Docs

WARNING:
1. H-Sphere VPS 1.4-1 is a private release for beta testers. Do not use it for production servers!
Please refer to the VPS Releases for the latest stable version.
2. H-Sphere VPS 1.4-1 requires H-Sphere 2.5 Beta 1 and up!

This document will guide you through preparation of the server where the FreeVPS and H-Sphere VPS packages will be installed, and through the VPS installation and configuration procedure.

 

System Requirements

H-Sphere VPS and FreeVPS requires a dedicated box with Red Hat Linux release 7.3, Red Hat Enterprise Linux release 3, or CentOS 3.x, White Box Enterprise Linux release 3 installed.

We do not provide kernel-freevps, freevps-tools and hsphere-vps packages for other operating systems.

  • We recommend you to use only standard hardware in your FreeVPS boxes, because kernel packages we provide are compiled on standard kernel configuration.
  • If you use non-standard hardware devices, you need to recompile FreeVPS kernel to work properly with them.
  • It is highly advised running VPS on Intel or Athlon processors, multiprocessor systems also supported.
    It is recommended using SMP if you plan to install 10-20 VPS servers on the box.
    Cyrix and other CPUs are not recommended;
  • Separate disk partition for virtual servers, with enough space on it, is required.
    For example, if you want to install 10-20 VPS servers, you need up to 10-20 GB disk space.
    Basic VPS installation requires ~ 400 Mb disk space.
    Complete VPS installation (with all VPS templates installed) requires ~ 800 MB.
  • At least 512MB RAM on FreeVPS host server is advisable;
  • 3com or Intel ethernet interfaces are recommended;
  • RedHat installation should include the minimal set of packages, namely:
    standard Linux make tools, c++/gcc compiler, autoconf, base Perl.
  • Don't forget to provide enough space for Linux distribution packages.
    We recommend you to allocate distribution package directory and/or to configure tools to download required resources from the Web.

 

Required Packages

The following packages should be installed:

  • H-Sphere VPS scripts:
    hsphere-vps-1.4-1.noarch.rpm

    Note: We provide hsphere-vps packages only for:
    - Red Hat Linux release 7.3 with Perl 5.6.1 installed.
    - Red Hat EL 3, CentOS 3.x, White Box EL 3 with Perl 5.8.0 installed.
    If you need to install these packages on one of the mentioned platforms with other versions of Perl, you need to rebuild H-Sphere VPS.

    Additional Perl packages:

    perl-RPM-VersionSort-1.00-1.redhat.i386.rpm
    RedHat 7.3:
    perl-XML-Simple-2.14-2.0.rh7.rf.noarch.rpm
    RedHat EL 3 and its clones:
    perl-XML-Simple-2.14-2.1.el3.rf.noarch.rpm

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

Red Hat Linux release 7.3:

  • kernel-freevps package, version 1.4, patched to support VPS:
    kernel-freevps-1.4-x

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

    Find the latest kernel releases and related packages at the FreeVPS download area.

  • 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

  • FreeVPS tools:
    freevps-tools-1.3-x

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

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

  • kernel-freevps package, version 1.4, patched to support VPS:
    kernel-freevps-1.4-x.

    You need to choose suitable for your platform, processors count, memory capacity kernel.
    Note: For servers with RAM 1GB and more, we recommend to install the kernel-freevps-hugemem package (supports up to 64 GB of memory). 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-x

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

Please also check the list of VPS releases and patches.

 

Installation Procedure

  1. Install and configure FreeVPS kernel.

  2. Install additional Perl RPMs required:

    # rpm -ivh perl-RPM-VersionSort-1.00-1.redhat.i386.rpm

    RedHat 7.3:

    rpm -ivh perl-XML-Simple-2.14-2.0.rh7.rf.noarch.rpm

    RedHat EL 3 and its clones:

    rpm -ivh perl-XML-Simple-2.14-2.1.el3.rf.noarch.rpm

  3. Install H-Sphere VPS package:

    # rpm -Uvh hsphere-vps-1.4-1.noarch.rpm
  4. Install H-Sphere script runner and sudo packages:

    # rpm -Uvh hsphere-script-runner-1-8.rpm

    Red Hat Linux release 7.3:

    # rpm -Uvh hsphere-sudo-1.6.3p5.rpm

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

    # rpm -Uvh hsphere-sudo-1.6.7p5-0.rpm

 

VPS Host Configuration

To configure all Virtual Private Servers, run configuration script:

# /hsphere/shared/scripts/vps-configure.pl

If your installation was successful, you'll see information about Virtual Private Server.
For example:

Kernel: 2.4.21-freevps-1.4hugemem
FreeVPS patch build: 1114360337
Base freevps tools package: freevps-tools-1.3-17
H-Sphere VPS scripts package: hsphere-vps-1.4-1
RedHat release: RH73

With the further steps, you'll perform basic configuration for all your VPSs. The default values are enclosed in square brackets ([ ]). To accept them, press <ENTER>.

  1. Point to all Virtual Private Servers home directory which you created on step 4 of the installation:

    Please point to the directory where all Virtual Private Servers will be stored.
    Make sure it has enough free space!
    The default is: [/hsphere/local/vservers]

    After entering path, you will be informed about free disk space in it:
    Free disk space on /hsphere/local/vservers: XXXXXXXX Mb
  2. Choose the gateway. The gateway of the main server, suggested as the default, should be selected if the main server and the virtual private servers will belong to the same subnet. Otherwise, enter a different gateway's IP:

    Gateway will be used for routing by VPSs: [192.168.112.1]
    See also VPS Network Configuration
  3. Specify the IPs of your name servers. If you are running the script for the first time, no defaults are suggested. Once you enter name server IPs, they will be remembered and used when you run the script again:

    Enter name server IP(s) separated with spaces: [192.168.112.1 192.168.112.102]
  4. 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 ethernet device will be used for VPSs: [eth0]
  5. If it is required to assign more than 16 IPs to VPS, type "yes" to use ethernet aliases:

    Would you like to use virtual ethernet device [eth0] aliases instead of creating new virtual devices [yes/no]?

    Normally, VPS supports up to 16 virtual ethernet devices, and up to 16 IPs per each virtual ethernet device, thus totally 16x16=256 IPs available for assignment per VPS. But if it requires to assign more than 16 different IPs to VPS, you need to reconfigure your VPS to assign IPs to virtual ethernet devices aliases.

  6. Specify the directory with the full set of RPMS. If you don't have the RPMS, they will be downloaded to this directory on the next step. If your RPMS are located in the default directory (for example, in /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]
  7. Then you will be asked for required packages checking.
    Configuration script can perform package test in case it is damaged, using gpg -- encryption and signing tool.
    To say "yes" just press 'Enter' or type 'y', 'yes'.

    Would you like to check Linux RH73 installation RPMs [y/n]?
  8. You can install additional packages for your VPS, such as:

    samba-server - Windows File Server
    ftp-server - FTP Server
    pgsql-server - Postgresql SQL Database
    web-server - Web Server
    dns-server - DNS Name Server
    mysql-server - MySQL Database
    mail-server - Mail Server
    news-server - News Server
    perl-full - Perl programing language modules
    system-tools - System Tools
    development-tools - Development Tools

    You can also enable some additional services:

    smb - provide SMB network services
    winbind - Starts and stops the Samba winbind daemon
    postgresql - This is the init script for starting up the PostgreSQL server
    aep1000 - load and unload AEP1000 coprocessor driver
    bcm5820 - BCM5820 - Broadcom BCM5820 Cryptonet init script
    squid - Squid - Internet Object Cache
    tux - This starts and stops the TUX kernel-based http server.
    httpd - Startup script for the Apache Web Server
    named - DNS service
    mysqld - This service takes care of starting and stopping the MySQL subsystem (mysqld);

    You will get the following prompt:

    Would you like to install additional templates such as: "(templates list goes here)" [y/n]?

    If you choose to install additional packages, you will have the opportunity to configure templates and services to be available on your Virtual Private Servers. Read more H-Sphere VPS templates.

    Additional services:
    1 - [ ] httpd
    2 - [ ] sendmail
    3 - [ ] mysqld
    4 - [ ] postgresql
    5 - [ ] rhnsd
    6 - [+] winbind
    --------------------------
    [ a ] - add
    [ d ] - delete
    [ s ] - save and exit
    [ e ] - exit without saving
    ---------------------------
    Enter the number of the service to be turned on/off,
    or choose an option:

      If you are going to enable new Additional services, the script will prompt you to enter the name of a service.

      Mind that service must be installed to a virtual server. /etc/rc.d/init.d/<service_name> is required to start/stop the service in your virtual server(s).

      For example, to enable the winbind service, packages from the samba list (/hsphere/local/config/vserver/RH73/rpm_samba.cfg) will install the /etc/rc.d/init.d/winbind file.

      [ d ] - deletes lists/services from the additional package lists/services enabled.

      [ c ] - changes list installation priority.

      For example, installation packages from the http package list (packages required to install Apache Web server) require the gcc package to be installed first.

      [ n ] - helps you to create your own list of additional packages to install.

      Enter the name of the new list of package (i.e., my_list) and the names of RPM packages to be added to the list. Press Enter after each package name. When you finish, press Ctrl+D.

      Remember that all of this packages must be located in the RPMS directory. If these packages are not there, you will be prompted to download them.

      Then, you save the list and exit ([ s ]), or exit without save ([ e ]).

  9. If you don't have required RPM packages for the base Linux installation (e.g. you installed RedHat from a CD-ROM), answer YES (type 'yes'), and the script will download these packages:

    Would you like the script to automatically download required for Linux RH73 installation RPMs [yes/no]?
  10. If you choose to download the packages (answered YES on the previous step), you will be prompted for their location:

    Please specify the URL where Linux RH73 installation RPMs are located.
    The default is: [ftp://192.168.112.77/pub/RedHat/7.3/RedHat/RPMS]
    If the URL is valid, the download will start:
    Downloading packages ...
    base packages:
    4Suite-0.11.1-8.i386.rpm                [OK]
    Distutils-1.0.2-2.noarch.rpm            [OK]
    ...
    ------------------------------------
    202 packages successfully downloaded.
    0 packages skipped.
    0 packages failed to download.

    If some packages fail to download, please download them manually or run this script once again.

  11. Script will check all required packages. If the gpg Linux RPMs public key is not installed, script will install it.
    Also script will import Linux RPMs public key to rpm database.
    If public key is installed and imported, you will see it, and all templates will be checked. For example:

    Linux RH73 RPMs public key:
    /root/.gnupg/pubring.gpg
    ------------------------
    pub  1024D/DB42A60E 
    sub  2048g/961630A2
    Checking packages required for VPS initialization ...
    Checking in 'base' template ...
    
  12. 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]?

At this point, the script will finish the configuration with the following notification (see VPS cron scripts in VPS scripts documentation):

Writing to crontab: vps-cron-fix.pl     [OK]
Writing to crontab: vps-cron.pl     [OK]
Writing to crontab: vps-cron-traf.pl    [OK]
Writing to crontab: vps-cron-delete.pl  [OK]
Changing chkconfig...   [OK]
        

At 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
 

Physical/Logical VPS Server Configuration Via Control Panel

To add and configure physical and logical VPS servers in H-Sphere:

  1. Generate SSH keys on your CP server and place them to VPS host server to provide SSH connection between VPS host and CP server;
  2. Follow the instructions in Admin Guide on adding and configuring physical and logical VPS servers in H-Sphere interface.
IMPORTANT:
Common instructions on adding physical and logical servers in Control Panel are not applicable in this case!

 

Getting VPS Status

To get information about existing Virtual Private Servers on your host, run the vps-list.pl script:

# /hsphere/shared/scripts/vps-list.pl
Kernel: 2.4.21-freevps-1.4hugemem
FreeVPS patch build: 1114360337 
FreeVPS tools: 1.3-17 
H-Sphere VPS: 1.4-1
RedHat release: RH73
Free disk space on VPS home [/vservers]: 14951 Mb
Virtual Private Servers found on the host:
--------------------------------------------------------------------------------------------------------
ID NAME       STATUS  VDEV:HDEV:IP/MASK+|-(UP|DOWN) DISK INF. (Mb)  MEMORY (Mb)   PROCESSES TRAFFIC (Mb)
--------------------------------------------------------------------------------------------------------
3  230.psoft  running eth0:eth0:192.168.112.230/24+  372.740   200  2.289    200  6    1.871
                      eth1:eth0:192.168.112.239/24+
4  231.psoft  running eth0:eth0:192.168.112.231/24+  395.604   200  8.461    200  15   0.001
--------------------------------------------------------------------------------------------------------

You would be prompted to display all VPS settings:

Display all VPS settings on this host [y/n]?

If you agree, you would obtain all configuration information related to Virtual Private Servers on your host:
- VPS configuration parameters;
- crontab settings;
- chkconfig settings.

 

VPS Package Installer

To install additional packages on existing VPS, use the vps-pkg-inst.pl script. It installs package/lists of packages to the VPS you specified or to all known VPS on the host.

Run # ./vps-pkg-inst.pl -h to get help on the script options:

vps-pkg-inst.pl - tools to install package(s) on Virtual Private Server(s)
  usage: vps-pkg-inst.pl VPS_NAME|--all|-a OPTIONS
        [VPS_NAME]      Virtual Private Server name to install package(s)
        --all|-a        install package(s) to all known VPSs
  OPTIONS:
        --package=<package_name>|-p <package_name>
        Install package. Full path to the package required.
        --template=<template>|-t <template>
        Install package(s) included to the <template>.

The first script argument is the VPS name. If -a (or --all) option is specified, the installation will be performed to all known VPSs.

Options:

  1. --package=<package_name>
    -p <package_name>
    - installs RPM package <package_name>. Full path to <package_name> is required.

    Example:

    --package=/pub/RedHat/7.3/RedHat/RPMS/mc-4.5.55-5.i386.rpm
    -p /pub/RedHat/7.3/RedHat/RPMS/mc-4.5.55-5.i386.rpm
  2. --template=<mytemplate>
    -t <mytemplate>
    - installs package(s) included to <mytemplate>. The rpm_<mytemplate>.cfg file must be located in the VPSCONFIGS/OS_TYPE directory, where VPSCONFIGS is by default /hsphere/local/config/vserver/,and OS_TYPE is:

    • RH73 for Red Hat 7.3;
    • RHAS3 for Red Hat AS 3;
    • RHES3 for Red Hat ES 3;
    • RHWS3 for Red Hat WS 3;
    • WBEL3 for White Box EL 3
    • CentOS3 for CentOS 3.x
    # ls -la /hsphere/local/config/vserver/RH73/rpm_php.cfg
    -rw-r--r-- 1 root root 126 /hsphere/local/config/vserver/RH73/rpm_php.cfg

Examples:

  1. # cd /hsphere/shared/scripts
    # ./vps-pkg-inst.pl 241.tst -t php    (# ./vps-pkg-inst.pl 241.tst --template=php)
    Preparing...                ########################################### [100%]
       1:php                    ########################################### [ 20%]
       2:php-devel              ########################################### [ 40%]
       3:php-imap               ########################################### [ 60%]
       4:php-ldap               ########################################### [ 80%]
       5:php-odbc               ########################################### [100%]
    
  2. # ./vps-pkg-inst.pl -a --package=/RPMS/mc-4.5.55-5.i386.rpm
    Installing packages to all known Virtual Private Servers...
    Installing on [231.tst]...
    Preparing...                ########################################### [100%]
       1:mc                     ########################################### [100%]
    [OK] installation successful
    Installing on [232.tst]...
    Preparing...                ########################################### [100%]
    package mc-4.5.55-5 is already installed
    [ERROR] installation failed.
    

For more information, see VPS Scripts guide.


Related Docs:   VPS Configuration (Admin Guide) VPS Upgrade (Private) VPS Scripts • FreeVPS Docs







Home   Products   Services   News
© Copyright. . PSOFT. All Rights Reserved. Terms | Site Map