This document is a step-by-step instruction on how to globally configure all virtual private servers
from the VPS host server.
Though, H-Sphere VPS interface configuration may slightly vary from version to version, the core procedure
remains the same:
Log into the VPS host server under root and run the VPS configuration script:
# /hsphere/shared/scripts/vps-configure.pl
You'll see the versions of VPS packages installed on your host server. For example:
Kernel release: 2.6.9-freevps-1.5-6smp
FreeVPS kernel patch build: 1141652612
FreeVPS tools package: freevps-tools-1.4-3
H-Sphere VPS package: hsphere-vps-1.4-4
Host operating system is: Red Hat Enterprise Linux ES release 4 (Nahant)
Host operating system "code": RHES4
- Now you can install virtual servers with OS different from the one of the host.
For example, you can install virtual server with any of the Enterprise Linux 4 clones OSs
on the box with RHES4. All operating systems available and compartible with the one of your host will be listed.
The OS you select here will be used for all virtual servers created using H-Sphere Control Panel VPS plans.
You can select the operating system for new VPS servers created.
VPS server's operating systems available for your host:
RHES4 - Red Hat Enterprise Linux ES release 4
RHAS4 - Red Hat Enterprise Linux AS release 4
RHWS4 - Red Hat Enterprise Linux WS release 4
CentOS4 - CentOS release 4
WBEL4 - White Box Enterprise Linux release 4
Enter VPS servers operating system "code" [RHES4]: CentOS4
- Specify the directory with the full set of selected operating system RPMs required for virtual server(s) installation.
If you don't have the RPMs, they will be downloaded to this directory on the next steps.
Please specify where Linux CentOS4 installation RPMs are located.
The default is: [] /pub/CentOS4
- You can select a set of additional virtual server operating systems (compatible with your host OS) from the list below.
The OS you select here will be used for manual virtual servers creation, for example from console
(not from H-Sphere Control Panel VPS plans).
Would you like to be able to create VPS servers under other (not CentOS4) operating systems [y/No]? yes
VPS server's operating systems available for your host:
RHES4 - Red Hat Enterprise Linux ES release 4
RHAS4 - Red Hat Enterprise Linux AS release 4
RHWS4 - Red Hat Enterprise Linux WS release 4
CentOS4 - CentOS release 4
WBEL4 - White Box Enterprise Linux release 4
Enter VPS servers operating system "code" separated with spaces []: WBEL4
- Specify the directory prefix where full set of RPMS for all additional operating systems (in that case for WBEL4)
will be stored. If you don't have RPMS, they will be downloaded to apropriate directories on the next steps.
That means the full path to OS packages will be:
<prefix>/<os_code>
where:
<prefix> - the directory prefix you specified;
<os_code> - additional operating systems (you selected in step number 4,) short "code" (in that case WBEL4).
Please specify prefix derectory where operating system <code> (WBEL4) installation packages will be located.
The default is: [/hsphere/install/pkg/<code>] /pub
- Point to all Virtual Private Servers home directory which you have created during 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 the path, you will be informed about free disk space in it:
Free disk space on /hsphere/local/vservers: XXXXXXXX Mb
- There is a possiblitily to automatically update your virtual server templates and/or configs with new ones from our site
(if such are available).Answer 'yes' to the following question if you want to activate this possibility.
Would you like to automatically update some VPS configs and tempaltes [y/No]?
- In case your H-Sphere version is lower than 2.5 (without VPS subnets support), you must choose a gateway.
The gateway of the main server, suggested as the default, should be selected if the main server and the virtual private servers
belong to the same subnet. Otherwise, enter a different gateway's IP:
Virtual servers default gateway (in case subnets are not configured): [192.168.114.1]
- 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]
- In case your H-Sphere version is lower than 2.5 (without VPS subnets support),
you must set physical network interface which will be used by virtual servers.
The script tries to find this host's network device.
To accept the suggested value, press Enter. Otherwise, enter a different device name:
Virtual servers default physical network interface (in case subnets are not configured): [eth0]
- If you need 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.
- There is a possibility to check if all the required for virtual servers installation RPM packages
got properly downloaded and are not corrupted .
Answer "yes" to the following question if you would like the script to check them.
Would you like to check all required packages for corrupted [y/No]?
Infromation on corrupted files will be displayed in the following way:
error: /pub/RedHat/WBEL4/samba-common-3.0.10-1.4E.2.i386.rpm: MD5 digest: BAD Expected(0ca3e0e34d1178c3afd07124acc6dec4) != (2e7af0ce97a7e739b19ff8dd9e216757)
Operating system "WBEL4" template (system-tools) package samba-common-3.0.10-1.4E.2.i386.rpm located in /pub/RedHat/WBEL4 is corrupted!
- On this step you will be prompted to configure additional templates and services for default and additional selected operating systems.
First you should configure CentOS4 (the defauld VPS OS) additional templates, then WBEL4 (additional VPS OSs) additional templates.
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/AEP2000 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 about H-Sphere VPS templates.
Application Templates available to install:
1 - [ ] dns-server
2 - [ ] cpplus
3 - [ ] development-tools
4 - [ ] mail-server
5 - [ ] ftp-server
6 - [ ] mysql-server
7 - [ ] news-server
8 - [ ] pgsql-server
9 - [ ] samba-server
10 - [ ] system-tools
11 - [ ] web-server
---------------------------
[ a ] - add
[ d ] - delete
[ c ] - change templates install order
(required to satisfy packages dependences at installation time)
[ n ] - new template
[ m ] - modify template
[ s ] - save and exit
[ e ] - exit without saving
---------------------------
Enter the number of the template 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 ]).
You will get prompts like:
Would you like to install CentOS4 additional templates such as: [y/No]?
and
Would you like to install WBEL4 additional templates such as: [y/No]?
-
If you've chosen to download the packages (answered YES on the previous step),
you will be prompted for their location:
Would you like to automatically download all required installation packages [yes/no]? yes
Retriving WBEL4 packages
Forming WBEL4 packages to download hash
Please specify the URL where Linux WBEL4 installation RPMs are located:
If the URL is valid, the download will start:
Retriving packages
------------------------------------
MAKEDEV-3.15-2.i386.rpm . [OK]
...
zlib-1.2.1.2-1.i386.rpm . [OK]
------------------------------------
211 packages successfuly downloaded.
0 packages skipped.
0 packages failed to download.
Packages will be downloaded for all selected operating systems: defaul operating system (CentOS4), additional operatins systms (WBEL4).
- The script will check if all the required packages have been downloaded.
If you configured to check the packages for corruptions, the script will inform you if such RPMs have been downloaded.
Checking packages required for VPS initialisation ...
Checking WBEL4 packages
Checking CentOS4 packages
- 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:
Checking [/usr/lib/freevps]: [OK]
Checking [/hsphere/local/config/vserver]: [OK]
Checking [/pub/CentOS4]: [OK]
Checking [/hsphere/local/config/vserver]: [OK]
Checking [/hsphere/local/vservers]: [OK]
Checking [/hsphere/local/config/vserver/cp]:
Creating... [OK]
Checking [/hsphere/shared/scripts]: [OK]
Checking [/hsphere/local/var/statistic]: [OK]
Checking [/hsphere/local/var/statistic/loaded]:
Creating... [OK]
Checking [/hsphere/install/pkg]: [OK]
Checking [/sbin]: [OK]
Checking [/usr/sbin]: [OK]
Checking [/var/log/hsphere]: [OK]
Checking [/var/log/hsphere]: [OK]
Checking [/var/log/hsphere]: [OK]
Checking [/hsphere/local/config/vserver]: [OK]
At the end, you'll be prompted to save the changes you have made:
Save your changes [y/n]? y
After that the script will display saved parameters:
Saving...
Writing to crontab: cron/vps-cron.pl [OK]
Writing to crontab: vps-cron-confs-update.pl [OK]
Writing to crontab: vps-cron-pkgs-update.pl [OK]
Writing to crontab: vps-cron-traf.pl [OK]
Writing to crontab: vps-cron-delete.pl [OK]
Writing to crontab: vps-cron-fix.pl [OK]
Writing to crontab: vps-cron-net-reconfig.pl [OK]
Configuration saved.