Parallels H-Sphere - 3.1 Upgrade Guide

Parallels®
Legal and Copyright Notice
ISBN: N/A Parallels 660 SW 39th Street Suite 205 Renton, Washington 98057 USA Phone: +1 (425) 282 6400 Fax: +1 (425) 282 6444
© Copyright 2008, Parallels, Inc. All rights reserved
Distribution of this work or derivative of this work in any form is prohibited unless prior
written permission is obtained from the copyright holder.
Product and service names mentioned herein are the trademarks of their respective owners.
Contents
Preface 5
Typographical Conventions ........................................................................................................... 5
Feedback ....................................................................................................................................... 6
About This Guide 7
Preparing for Upgrading Parallels H-Sphere 8
Upgrading Parallels H-Sphere 10
Step 1. Creating Update Profiles for Physical Servers ................................................................ 11
hsphere-update Package Reference ................................................................................ 13
Step 2. Updating Parallels H-Sphere Control Panel Core ........................................................... 14
Step 3. Updating H-Sphere Windows HsCore MSI Package ...................................................... 15
Windows HsCore Update Procedure ................................................................................ 16
Step 4. Updating Physical Boxes ................................................................................................ 17
Option 1. Updating Physical Boxes from the Interface ..................................................... 17
Option 2. Updating Physical Boxes from Command Line ................................................. 18
Step 5. Updating PostgreSQL ..................................................................................................... 26
Step 6. Starting Control Panel Apache ........................................................................................ 27
Step 7. Starting ImageMaker ....................................................................................................... 27
Step 8. Checking the Version of Parallels H-Sphere ................................................................... 27
Post-Upgrade Issues 28
Appendix A. Supported Operating Systems 29
Appendix B. HDD Partitioning 30
Appendix C. Customizing Server Configuration Files By Means of Templates 31
CP Apache ................................................................................................................................... 34
Extra CP Apache Configs ............................................................................................................ 35
Apache ......................................................................................................................................... 36
Customizing /hsphere/shared/apache/htdocs/index.html ................................................. 36
Extra Apache Configs .................................................................................................................. 37
PHP 4 .......................................................................................................................................... 38
PHP 5 .......................................................................................................................................... 39
FTP .............................................................................................................................................. 40
MySQL ......................................................................................................................................... 41
PostgreSQL ................................................................................................................................. 41
DNS ............................................................................................................................................. 42
etc/named.conf .................................................................................................................. 42
etc/resolv.conf ................................................................................................................... 43
Preface 4
Other Files Included into Parallels H-Sphere Packages ............................................................. 43
Appendix D. Download Locations 44
Mirror Server for Parallels H-Sphere Downloads ........................................................................ 46
In this chapter:
Typographical Conventions ............................................................................... 5
Feedback .......................................................................................................... 6
Formatting convention
Type of Information
Example
Special Bold
Items you must select, such as menu options, command buttons, or items in a list.
Go to the System tab. Titles of chapters, sections, and subsections.
Read the Basic Administration chapter.
Italics
Used to emphasize the importance of a point, to introduce a term or to designate a command line placeholder, which is to be replaced with a real name or value.
The system supports the so called wildcard character search.
Monospace
The names of commands, files, directories, and domain names.
The license file is located in the
http://docs/common/
licenses directory.
C H A P T E R 1
Preface
Typographical Conventions
Before you start using this guide, it is important to understand the documentation conventions used in it.
The following kinds of formatting in the text identify special information.
6 Preface
Preformatted
On-screen computer output in your command­line sessions; source code in XML, C++, or other programming languages.
# ls –al /files
total 14470
Preformatted Bold
What you type, contrasted with on-screen computer output.
# cd /root/rpms/php
CAPITALS
Names of keys on the keyboard.
SHIFT, CTRL, ALT
KEY+KEY
Key combinations for which the user must press and hold down one key and then press another.
CTRL+P, ALT+F4
Feedback
If you have found a mistake in this guide, or if you have suggestions or ideas on how to improve this guide, please send your feedback using the online form at
http://www.parallels.com/en/support/usersdoc/. Please include in your report the
guides title, chapter and section titles, and the fragment of text in which you have found an error.
This guide provides instructions on upgrading Parallels H-Sphere 2.4.3 Patch 11 or
C H A P T E R 2
About This Guide
higher to version 3.1 Patch 1. If you have an older version:
1 Update to Parallels H-Sphere 2.4.3 Patch 11 first or contact Parallels
H-Sphere support (http://www.parallels.com/support/hsphere/).
2 Run a separate PostgreSQL update script to update PostgreSQL to
7.4.x version as described at
http://hsphere.parallels.com/misc/postgres-7.4.17.html.
Consider this before you update Parallels H-Sphere:
C H A P T E R 3
Preparing for Upgrading Parallels H-Sphere
The upgrade will not work without a valid Parallels H-Sphere license to cover all
accounts in the system.
Please refer to the list of operating systems (on page 29) supported by Parallels
H-Sphere. Warnings:
1. Update to Parallels H-Sphere 2.5 and up is not recommended for Parallels H-Sphere clusters with CP servers under FreeBSD 4.x up to FreeBSD 4.9, as these FreeBSD versions do not fully support Java 1.5.
2. Parallels H-Sphere Winbox versions earlier than 2.5 wont work correctly with Parallels H-Sphere 2.5 RC 1 and up. In the same way, Winbox 2.5 RC 1 and up wont work with Parallels H-Sphere under 2.5.
3. Serv-U FTP is no longer supported in Parallels H-Sphere Winbox 2.5 and up. If you are currently using it and would like to update to this version, first switch to MS FTP as described in the Migration of Serv-U to MS-FTP section of Parallels H-Sphere System Administrator Guide.
4. We currently dont recommend updating Parallels H-Sphere to version 2.5 and up when there are 512 and more ColdFusion mappings on a Windows server (i.e., ColdFusion is turned on for more than 511 Winbox users).
5. No update is any longer available for RedHat 7.3, RedHat AS/ES/WS, FreeBSD 4.11. All Parallels H-Sphere servers under these operating systems need to be migrated to other supported OSs before the update.
Config files for Apache, FTP, PHP, DNS, MySQL, and PostgreSQL should be
customized indirectly via respective template files. Otherwise, all custom
changes in major default configuration files are removed with each Parallels H-Sphere update. Please carefully follow the config file templates customization instruction.
If you update to Parallels H-Sphere 3.1+ from Parallels H-Sphere 2.5 or 3.0, your custom config file templates will be ignored. You need to recustomize them.
Update on boxes with FreeBSD 5.3 and up will halt if the /hsphere directory is a
symlink! Please re-partition your servers HDD to move Parallels H-Sphere content to the /hsphere directory before you proceed with the update. Please refer to Appendix B. HDD Partitioning (on page 30).
If you have CP installed on a FreeBSD box, especially in case of multiprocessor
architecture, please make sure you have the /etc/libmap.conf file on the CP box that can be downloaded from
http://hsphere.parallels.com/downloads/libmap.conf.
Preparing for Upgrading Parallels H-Sphere 9
If you have a mail server running on the same box as the CP server, and CP server
uses port 80, change CP port to 8080 in /hsphere/local/home/cpanel/apache/conf/httpd.conf or contact Parallels H-Sphere support (http://www.parallels.com/support/hsphere/).
Custom server groups for name (DNS) logical servers are no longer supported. If
you are upgrading from Parallels H-Sphere 2.4.3 or earlier versions, please remove all custom name server groups (including all respective logical/physical servers). Please refer to Server Groups section of Parallels H-Sphere Service Administrator Guide at http://www.parallels.com/en/hsphere/docs/ for details.
MySQL Updates.
If you are running MySQL version 3.x, please update to the latest MySQL 4.x
version prior to updating Parallels H-Sphere.
Update MySQL v. 4.0 to 4.1: If your clients created
databases/tables/fields in the tables with specific charset, please refer to the following documentation:
Character set upgrade (http://dev.mysql.com/doc/refman/4.1/en/charset-
upgrading.html).
Connection Character Sets and Collations
(http://dev.mysql.com/doc/refman/4.1/en/charset-connection.html).
The procedure of MySQL update from version 4.x to 5.0 is performed
automatically. But it is reasonable to refer to the following documentation: Upgrading from MySQL 4.1 to 5.0
(http://dev.mysql.com/doc/refman/5.0/en/upgrading-from-4-1.html).
mysql_upgrade - Check Tables for MySQL Upgrade
(http://dev.mysql.com/doc/refman/5.0/en/mysql-upgrade.html).
mysql_fix_privilege_tables - Upgrade MySQL System Tables
(http://dev.mysql.com/doc/refman/5.0/en/mysql-fix-privilege-tables.html).
Since Parallels H-Sphere 3.0+, you can download installation/update script from our
mirror site at http://download2.hsphere.parallels.com. For more information refer to Parallels H-Sphere install/update script options (on page 19) section.
If you update from Parallels H-Sphere 3.1 Beta 1 or earlier, please make sure to
update EasyApp with the respective collection package built for Parallels H-Sphere
3.1+.
To upgrade Parallels H-Sphere, please perform the steps provided below in this
In this chapter:
Step 1. Creating Update Profiles for Physical Servers ....................................... 11
Step 2. Updating Parallels H-Sphere Control Panel Core .................................. 14
Step 3. Updating H-Sphere Windows HsCore MSI Package ............................. 15
Step 4. Updating Physical Boxes ....................................................................... 17
Step 5. Updating PostgreSQL ........................................................................... 26
Step 6. Starting Control Panel Apache .............................................................. 27
Step 7. Starting ImageMaker ............................................................................. 27
Step 8. Checking the Version of Parallels H-Sphere .......................................... 27
C H A P T E R 4
Upgrading Parallels H-Sphere
chapter.
Upgrading Parallels H-Sphere 11
Step 1. Creating Update Profiles for Physical Servers
Physical server profiles are sets of rules for updating/installing physical boxes. By default, Parallels H-Sphere includes the DEFAULT profile which cant be removed or changed. If not set otherwise, the box is updated according to this DEFAULT profile.
You can create your own update profiles from the Parallels H-Sphere administrator interface and assign them to specific boxes. In this case, the system will update the server according to the profile its assigned to.
To create a profile:
1 Go to E.Manager -> Update -> Physical server profiles. 2 Choose the box (Unix/Windows) and click the Add button. 3 Name and configure your profile in the form that appears:
Adding Unix profile: with some of the parameters refer to the section on
hsphere-update Package (on page 13).
Adding Windows profile check if needed the following options:
Update only pointed logical server groups. You can choose between three
hosting modes: Windows hosting only, MsSQL hosting only, or both Windows and MsSQL hosting modes
Source URL for packages download redefinition is the link to an alternative server
with MSI packages. If not set, default MSI location is
http://download.hsphere.parallels.com/shiv/HS/WINDOWS/.
Location of user home directory. If it is not set there, H-Sphere Winbox installer
will automatically create it on NTFS partition with the largest free space.
MAC address of network interface to host dedicated IPs, etc. If not set there,
H-Sphere Winbox installer will automatically choose an address based on the free IPs of a physical server.
Name of MSSQL server instance. Give a name to a MsSQL server instance if
you want it to differ from a default one generated from a NetBIOS name of a specific server.
4 Click Save to apply. The newly-created profile will appear in the list of
existing profiles.
5 Click the Assign Profiles to Physical Servers link to assign the profile to a
server.
Note: You can assign only one profile to a server. But one and the same profile can be assigned by several servers.
6 Check a physical box and click Apply. To reassign a profile:
1 Go to E.Manager -> Servers -> P. Servers.
12 Upgrading Parallels H-Sphere
2 Click the physical server name you want to reassign a profile to.
In this section:
hsphere-update Package Reference ................................................................. 13
3 Click the Edit icon in the Physical Server Profile field. 4 Reassign the profile.
From now on, every time you update this physical box from CP interface, it will update according to the profile.
Upgrading Parallels H-Sphere 13
hsphere-update Package Reference
The hsphere-update package is installed during Parallels H-Sphere installation on each physical box. When updating Parallels H-Sphere, it runs the upackages script on the CP box to update Parallels H-Sphere packages on each box to their latest version.
upackages Syntax
upackages [ -h ] [ -i ] [ -f ] [ -s ] [ -v version ] [ -V ] [ -e show|add:pattern,...|del:pattern,...|del:all ] [ -p ] [ -w ] [ -m ] [ -j ] [-P] [-r ] [ -u ] [ -P ] [ -n ] [
-M ] [ -S ] [ -R ] [ -N ] [ -I ] [ -o ] Where:
h - help information.
-i - ignore md5 sum of the downloaded packages, only warning.
-f - force mode, update packages by force, when md5 sum of the installed hsphere
package differs from downloaded package.
-s - update only packages change, which takes place in the hsphere subversion
according to corresponding version.
-v version, format U[version]/U[subversion]. If not specified,
/hsphere/shared/etc/hsversion file is checked.
-V - verbose mode
-e - [show|add:pattern1,pattern2,...|del:pattern1,pattern2,...|del:all] - show, set
or delete the list of the package patterns, which must be skipped during update on all or specific list of HS boxes.
Note: Use this carefully, as HS packages are connected with HS version. This may be used if you have customized version of the specific HS package or if you update system packages, like MySQL server, via native OS package manager, etc.
p - PostgreSQL update (for new HS box this is done by default)
-w - Site Studio update
-m - MyDNS service is used instead of Bind 9.3.x, Update of the bind will be
skipped.
-j - required during IP migration
-r - package update strictly according to package list (by default update of packages
with higher version skipped)
-t [php,httpd,ftpd,mysql,pgsql,cphttpd,named] - place custom templates in the
required location for further editing
-P - private update (for testing purpose).
-u - Source URL for packages download redefinition.
-n - Skip restart of postgres and httpdcp at the end of update.
-M - update modes (presingle, hspresingle, postsingle, hspostsingle,
cpinstall, hsupdate, postgres, sitestudio, update, ipmigration, deploy) :
presingle - single server package mode  hspresingle - presingle mode, except sitestudio installation  postsingle - single server deploy mode  hspostsingle - postsingle mode, except sitestudio postconf
14 Upgrading Parallels H-Sphere
cpinstall - control panel preinstall procedure  update - full update (all packages update)  hsupdate - update mode, except sitestudio update  postgres - postgres update  sitestudio - sitestudio update  ipmigration - reconfiguring IP dependent information  deploy - deploy mode (general box post-reconfiguration)
S - slave installation/update mode - provides installation/update of web or mail
slave box.
-R mask1[,mask2,...] - revert mode, provides downgrade of a set of packages with
mask1[,mask2,...]
-N - this option allows to force install/update for the deprecated OS/soft listed in
http://www.psoft.net/eol.html if possible.
-I - this option allows to get exclude package list from stdin (used in HS 3.1 for
different update profile configuration in CP interface). Retrieved package list is merged with pre-configured exclude package list.
-o - skips pre-configured exclude package list during update.
For instance, to install packages for Parallels H-Sphere 2.5 Patch 6 with md5 sum of the downloaded files ignored run:
upackages -i -v U25.0/U25.0P6
Step 2. Updating Parallels H-Sphere Control Panel Core
To update Parallels H-Sphere CP core:
1 Download the install/update script. For example, for 3.1 RC 1 (Build
903) run:
Linux:
# wget
http://download.hsphere.parallels.com/shiv/HS/releases/U31.0/U31.0P1/U3
1.0P1
FreeBSD:
# fetch
http://download.hsphere.parallels.com/shiv/HS/releases/U31.0/U31.0P1/U3
1.0P1
2 Stop Parallels H-Sphere using one of the following commands:
Linux:
# /etc/rc.d/init.d/httpdcp stop
FreeBSD:
# /usr/local/etc/rc.d/apachecp.sh stop
Stop Parallels SiteStudio ImageMaker by running:
Upgrading Parallels H-Sphere 15
# /hsphere/shared/SiteStudio/imaker.sh stop
In this section:
Windows HsCore Update Procedure ................................................................. 16
3 Run the update script:
# sh ./U31.0P1
You will see a help window with a prompt to enter update options.
4 Update Parallels H-Sphere core (templates, classes, jars):
cpupdate [OPTIONS]
Step 3. Updating H-Sphere Windows HsCore MSI Package
Skip this step if your Parallels H-Sphere cluster contains a Windows server. Upgrade Winbox to Parallels H-Sphere 3.1 Patch 1. Parallels H-Sphere Winboxes of
earlier versions are not compatible with Parallels H-Sphere Control Panel 3.1 and up. Prior to the update, consider the following:
1 Parallels H-Sphere Windows 3.1 and up is not compatible with Parallels H-Sphere
Control Panel 3.0 or lower. Before you update Parallels H-Sphere Winbox, you must first update Parallels
H-Sphere to the respective 3.1+ version.
When updating Parallels H-Sphere Winbox from version 2.4.3 or below, update
it first to 3.0 Patch 5 and only then to 3.1+.
2 Open SOAP port 10125 for data communication between Control Panel and
Windows server.
3 If you are going to use Microsoft Windows SharePoint Services, before upgrading
Parallels H-Sphere Winbox make sure to install SharePoint as described in the section Setting Up SharePoint to Use MSSQL Server of Parallels H-Sphere System Administrator Guide.
4 We currently dont recommend updating Parallels H-Sphere Winbox when there are
512 and more ColdFusion mappings on a Windows server (i.e., ColdFusion is turned on for more than 511 user domains).
16 Upgrading Parallels H-Sphere
Windows HsCore Update Procedure
1 Download Parallels H-Sphere Windows HsCore MSI
package:HsCore_3.1.269.3124.msi from
http://download.hsphere.parallels.com/shiv/HS/WINDOWS/HsCore_3.
1.269.3124.msi.
2 Run HsCore and follow its instructions. 3 Restart Parallels H-Sphere Winbox:
1. To stop H-Sphere service on an H-Sphere Windows server, run in command prompt:
net stop hssvc net stop hsphere
Here, hssvc is required for ASP-based Winbox services implemented in earlier
versions of Parallels H-Sphere (written in C), and hsphere for SOAP­based Parallels H-Sphere services (written in .NET).
2. To start H-Sphere service on a Winbox, run:
net start hssvc net start hsphere
4 Restart IIS. To do this, run:
iisreset /restart
The rest of Parallels H-Sphere Windows MSI packages are updated from the interface as described in Step 4 (on page 17).
Important: 1 If you update from Parallels H-Sphere 2.5 or 3.0, Parallels H-Sphere home folder
(for example, C:\HSphere or C:\HSphere.NET) will be moved to C:\Program Files\HSphere.
2 If you update Winbox 2.5 or 3.0 with EasyApp installed, Update Wizard will build an
MSI package out of EasyApp applications and install them into a new location. An older collection package will be uninstalled.
3 Parallels H-Sphere Winbox resources are installed by means of respective MSI
packages. For more information on Parallels H-Sphere H-Sphere Winbox MSI Packages, refer to the section with the same title of Parallels H-Sphere System Administrator Guide.
Upgrading Parallels H-Sphere 17
Step 4. Updating Physical Boxes
In this section:
Option 1. Updating Physical Boxes from the Interface ....................................... 17
Option 2. Updating Physical Boxes from Command Line ................................... 18
You have two options for updating Parallels H-Sphere packages on physical boxes: Option 1 (on page 17). From the interface using respective physical servers profiles
(on page 11).
Option 2 (on page 18). From the command line by running the update script (on
page 19).
If you have customized versions of Parallels H-Sphere *nix packages or other system packages that you update via native OS package manager, you need to exclude them from the update. In this case, refer to the section on Selective Update of Parallels H-Sphere *nix Packages (on page 25).
If your default configuration files (Apache, PHP, mail, FTP or databases) are customized not by means of config file templates, you need to to create default config file templates to be customized afterwards. Update procedure in such a case is described in the section Updating Parallels H-Sphere with Default Configuration Files Not Customized By Means of the File Templates (on page 26).
Option 1. Updating Physical Boxes from the Interface
If you choose to continue the update from the interface, you need to start control panel Apache first as described in Step 6 (on page 27).
To update Parallels H-Sphere on selected physical servers:
1 Go to E.Manager -> Update -> Update Boxes. 2 Check the servers you need to update. 3 If necessary, you can get info about the box by checking boxes and
clicking the Fetch Boxes Info button.
4 Click Start Update.
Update process indicator legend:
Yellow: ready for update  Blue: update is running  Green: update successfully finished  Red: update finished with error. If update fails, you will see an error message with
details.
18 Upgrading Parallels H-Sphere
Option 2. Updating Physical Boxes from Command Line
In this section:
Parallels H-Sphere Update and Installation Script ............................................. 19
Selective Update of Parallels H-Sphere *nix Packages ..................................... 25
Updating Parallels H-Sphere with Default Configuration Files Not Customized By Means of File Templates 26
To update Parallels H-Sphere and Parallels SiteStudio, type:
update [OPTIONS]
To update only Parallels H-Sphere, enter:
hsupdate [OPTIONS]
To update only Parallels SiteStudio, enter:
sitestudio [OPTIONS]
Important: The above mentioned options can be used very flexible with a variety of sub-parameters. For example, you may specify the ips=LIST_OF_IPs or groups=LIST_OF_LSERVER_GROUPS parameters to run the update only on particular physical servers to affect only particular logical server groups (Web, mail, etc.). Also if you run the update with the force parameter, new or updated packages will be installed by force, regardless of conflicts. More on Parallels H-Sphere update/install script options (on page 19).
Upgrading Parallels H-Sphere 19
Parallels H-Sphere Update and Installation Script
Parallels H-Sphere administrator runs the same updater for Parallels H-Sphere installation and update. Moreover, the updater is used to update (and even downgrade) system packages and config file templates. Updater is executed from the corresponding Parallels H-Sphere update version.
Parallels H-Sphere updaters main features:
Implemented backward compatibility, particularly for postgres, sitestudio,
ipmigration keys.
Using set of Parallels H-Sphere self-configured packages, which take IP dependent
information from the config.xml file with the help of the hsinfo utility.
MD5 sum check before/after package download. Update of Parallels H-Sphere packages to the last set of available packages,
allowed by specific Parallels H-Sphere version/subversion.
Global check of the installed software after update for each box. Possibility to add additional service/server after configuring them via CP interface. Check of the required disk space for installation/update. Updater can be executed either in the interactive (wrapper) or in the non-
interactive (update scipts command line interface) modes.
Update is provided for all *nix physical servers in Parallels H-Sphere cluster,
including VPS servers. Parallels H-Sphere Updater consist of two parts: Wrapper which checks and installs, if needed, the hsphere-update package on
each box. Set of update scripts installed as the hsphere-update package.
Interactive Mode: Command Line Interface of the Wrapper
Parallels H-Sphere updaters interactive mode assumes that you first launch Parallels H-Sphere update script, like this:
# sh U31.0P1
And then type in one of the prompted options with or without parameter in the command line of the form that appears. See Parallels H-Sphere updater options.
Non-Interactive Mode: Update Scripts Command Line Interface
Parallels H-Sphere update script can run in non-interactive mode, i.e., without the need to enter the wrapper and type in the options there. Run the update script with the wrappers options, like this:
# sh U31.0P1 install cpinstall
or:
# sh U31.0P1 update hspackages ips=IP1,IP2
20 Upgrading Parallels H-Sphere
In this section:
Update Modes and Options ............................................................................... 21
Upgrading Parallels H-Sphere 21
Update Modes and Options
Parallels H-Sphere updater/installer is downloaded from Paralles H-Sphere download location. For example, for Parallels H-Sphere 3.1 Patch 1 run under root on a Linux box:
# wget
http://download.hsphere.parallels.com/shiv/HS/releases/U31.0/U31.0P1/U3
1.0P1
Run the script with a corresponding option. If you run:
# sh U31.0P1
the script will choose to update or install, according to what is available on the
server:
CP Unix user cpanel
the hsphere.properties file
consistent Parallels H-Sphere system PostgreSQL database
Parallels H-Sphere related software (if user ran updater mistakenly on a non-CP
box)
Important: It is highly recommended that you run the script with a specified update or installation mode.
To update Parallels H-Sphere, run the script in the update mode:
# sh U31.0P1 update
You will get the list of update modes, each having its own options:
======================================================================= ===
UPDATE
======================================================================= ===
(1) hsupdateupdate Parallels H-Sphere cluster, except Parallels SiteStudio. (for more
details, type 1).
===============================================================
=========== (2) updateupdate Parallels H-Sphere cluster including Parallels SiteStudio. (for more
details, type 2).
===============================================================
=========== (3) sitestudioupdate Parallels SiteStudio on the Control Panel box. (for more details,
type 3).
======================================================================= ===
(4) cpupdateupdate Parallels H-Sphere core and related packages only. (for more
details, type 4).
===============================================================
===========
22 Upgrading Parallels H-Sphere
(5) deployParallels H-Sphere cluster post-update configuration. (for more details,
type 5).
======================================================================= ===
(6) hspackagesParallels H-Sphere cluster update in custom mode; additional update
options (forming custom configuration files, maintaining exclude package lists,
skipping CP update, etc.) (for more details, type 6).
======================================================================= ===
(7) 3rdpackagesinstall missing files for Parallels H-Sphere hsp packages on
physical boxes. (for more details, type 7).
===============================================================
=========== (8) revertdowngrade packages to previous versions. (for more details, type 8).
If you want more information on each mode, simply type its number in the command line.
Update Modes:
hsupdate - common Parallels H-Sphere update, excluding system postgres and
Parallels SiteStudio.
Options:
hsupdate [ help ] [ ips=IP1,IP2,.. ] [
group=lgroup1,lgroup2,... ] [ private ] [ strict ] [ nomd5 ] [
force ] [ skip=stage ] [ url=Link ] [ mirror=mirror_number ]
update - Parallels H-Sphere update, including system postgres and Parallels
SiteStudio.
Options:
update [ help ] [ ips=IP1,IP2,.. ] [ group=lgroup1,lgroup2,...
] [ private ] [ strict ] [ nomd5 ] [ force ] [ skip=stage ] [
url=Link ] [ mirror=mirror_number ]
sitestudio - Parallels SiteStudio update.
Options:
sitestudio [ help ] [ ips=IP1,IP2,.. ] [
group=lgroup1,lgroup2,... ] [ url=Link ] [
mirror=mirror_number ]
cpupdate - update only Control Panel packages, templates, jars, etc.
Options:
cpupdate [ help ] [ ips=IP1,IP2,.. ] [
group=lgroup1,lgroup2,... ] [ url=Link ] [
mirror=mirror_number ]
deploy - the so-called deploy mode is run after all the system packages are
installed/updated. In the deploy mode Parallels H-Sphere updater downloads and
installs post-configuration scripts that perform general Parallels H-Sphere post-
install/post-update configuration.
Options:
Upgrading Parallels H-Sphere 23
deploy [ help ] [ ips=IP1,IP2,.. ] [ group=lgroup1,lgroup2,...
] [ private ] [ strict ] [ nomd5 ] [ force ] [ skip=stage ] [
url=Link ] [ mirror=mirror_number ]
hspackages - advanced mode to update Parallels H-Sphere related packages
across Parallels H-Sphere cluster.
Options:
hspackages [ help ] [ ips=IP1,IP2,.. ] [
group=lgroup1,lgroup2,... ]
[ private ] [ strict ] [ nomd5 ] [ force ] [ skip=stage ]
[ reconfig=front-end|spamassassin|all ]
[ mode=modename ] [ oscode ] [ mirror=mirror_number ]
exclude-mysql=show|add|del | exclude-postgresql=show|add|del |
exclude-dns=show|add|del ]
[ sitestudio ] [ postgres ] [ url=Link ] [ verbose ]
[ ctemplates=php,httpd,ftpd,mysql,pgsql,httpdcp,named ]
[ edit=IP:/path/to/custom/template ] [ skip-exclude ]
[ old-platform ]
3rdpackages - install missing files for Parallels H-Sphere hsp packages on
physical boxes.
3rdpackages [ help ]
This is a long term operation. To examine the output of the script use tail -f logfile
command. revert - downgrade packages to previous versions.
Options:
revert pkgs=[ list | package_name,package_name2,.. ] [ help ]
Options Description:
ips - only specific list of the target boxes from HS cluster may be pointed instead of
provide check update for all IPs in HS cluster; group - the list of logical server groups, separated by comma. Possible groups:
mail, web, dns, mysql, pgsql, cp, vps (using common ips and group tags is allowed).
private - private update for testing purpose.  strict - form package list based exclusively on package list. By default, downgrade
to older package version is skipped.
nomd5 - update is not critical for wrong md5 sum, only warning;  force - check md5 sum of the installed packages with the same version too, if
wrong md5 sum, install new package by force;
skip=[check|preparing]check - skip check-up and regeneration of the existing updater.  preparing - skip config.xml regeneration on boxes during update.  reconfig=front-end|spamassassin|all - this option is used in the case of front-end
(Horde, PhpMyAdmin, PhpPgAdmin) or SpamAssassin DB location redefinition. It
provides the list of boxes allocation where update and/or related reconfiguration is
required. mode=[hsupdate|update|ipmigration|deploy] - set update mode with one of the
options:
24 Upgrading Parallels H-Sphere
hsupdate - common update without postgres and sitestudio;  update - hsupdate including postgres and sitestudio;  ipmigration - reconfiguring IP dependent information;  deploy - deploy mode (post-install general box reconfiguration).  oscode - shows OS code of each box during update preparation.  mirror - allow to set another mirror instead of the default one. At this moment
available are the following HS servers:
N Host Location Status
--------------------------------------
0 psoft.net (USA) default
1 mirror.psoft.net (Europe)
exclude-mysql=show|add|del | exclude-postgresql=show|add|del | exclude-
dns=show|add|del - you can configure Parallels H-Sphere to use custom
PostgreSQL/MySQL versions instead of installing their default versions (read more
in the section Configuring H-Sphere to Use Non-Default MySQL/PostgreSQL
Versions of Parallels H-Sphere System Administrator Guide). In this case HS
updater allows excluding related package from the Parallels H-Sphere update
leaving the possibility to update them via native system package managers.
Example:
hspackages exclude-mysql=add ips=192.168.1.10
the exclude-dns= option allows to exclude standard Bind server in order to use
MyDNS server or other custom DNS servers (like djbdns, http://cr.yp.to/djbdns.html)
instead. More in the section MyDNS Installation and Configuration of Parallels
H-Sphere System Administrator Guide. skip-exclude - skip pre-configured exclude package list during current update. Skip
pre-defined exclude list that was previously set via exclude
sitestudio - update Parallels SiteStudio to last supported version.  postgres - update postgressql to the last supported version.  url=Link - alternative path for package download (instead of
http://download.hsphere.parallels.com/shiv/HS);
verbose - inform whether package was installed by force or with nodeps;  ctemplates=php,httpd,httpd2,cphttpd,httpd_extra,httpd2_extra,cphttpd_extra,
ftpd,mysql,pgsql,named - Place custom config file templates for comma-
separated list of services into predefined locations if custom templates are not there
already.
the httpd_extra, httpd2_extra, and cphttpd_extra options are used to
customize some extra config files (on page 37) respectively for Web servers
Apache 1.x and 2.x and for CP Apache. Also the httpd2 option is introduced for
Apache 2.2. edit=IP:/path/to/custom/template - edit custom config file template on a specified
server in a specified location. old-platform - this option allows to force install/update for the deprecated OS/soft
listed in http://www.psoft.net/eol.htmll.
subversion - there is global hsphere package list and its subversion differences.  help2 - get additional possibilities description. This key allow to check only
subversion check to speed up update (of course, update to corresponding hsphere
version is required before);
Upgrading Parallels H-Sphere 25
slaves=web|mail|all - choose this option to install/update packages on slave
servers of load balanced Web/mail clusters. More in the section Installation of Load
Balanced Web/Mail Clusters of Parallels H-Sphere System Administrator Guide. help2 - get description of additional possibilities description. This key allow to check
only subversion check to speed up update (of course, update to corresponding
hsphere version is required before); pkgs=[ list | package_name1,package_name2,.. ] - revert (downgrade) packages
separated by comma. For example: revert=hsphere-webmails,mysql,hsphere­mnogosearch Using pkgs=list will display the list of all packages you can downgrade. Choose from the list.
Selective Update of Parallels H-Sphere *nix Packages
If you have customized versions of Parallels H-Sphere *nix packages or other system packages that you update via native OS package manager, you need to exclude them from being updated by the script. Parallels H-Sphere update in this case should be run as follows:
1 Update Parallels H-Sphere core (templates, classes, jars):
cpupdate [OPTIONS]
2 To exclude the packages, type:
hspackages [ ips=<IP1>,<IP2>,...<IPN>]
exclude=add:<pattern1>,<pattern2>,...<patternN> skip=preparing
Here, <IPx> are physical server IPs, and <patternx> are packages to exclude. For
detailed syntax see command line interface of the Parallels H-Sphere Updater
wrapper.
To make sure you have successfully excluded the packages, run:
hspackages [ ips=<IP1>,<IP2>,...<IPN>] exclude=show
skip=preparing
Warning: Please be very careful in excluding the packages from the update list!
You must have serious reasons to do this!
3 Update Parallels H-Sphere related packages:
hspackages
Note: If you update Parallels H-Sphere packages from the interface, you can exclude the above mentioned packages from the update by checking the Exclude package list option in the physical server profile (on page 11).
26 Upgrading Parallels H-Sphere
Updating Parallels H-Sphere with Default Configuration Files Not Customized By Means of File Templates
1 Update Parallels H-Sphere core (templates, classes, jars):
cpupdate [OPTIONS]
2 To create default config file templates, type:
hspackages ctemplates=php,httpd,ftpd,mysql,pgsql
For syntax and details please read about customizing config files by means of
templates (on page 31).
Important: This command will create default config file templates in respective
directories. After that, you should customize them according to the custom
configuration you had before. Typical reasons for such customization may be the
use of Zend Optimizer, ChiliASP, ColdFusion Apache modules, etc.
3 Update Parallels H-Sphere related packages:
hspackages
Step 5. Updating PostgreSQL
To update PostgreSQL, run the following command:
hspackages postgres
Step 6. Starting Control Panel Apache
Skip this step if you chose to update Parallels H-Sphere packages from the interface. Parallels H-Sphere update script will automatically launch Parallels H-Sphere CP after the
update. Check if Parallels H-Sphere is running, and if not, start CP Apache:
Linux:
# /etc/rc.d/init.d/httpdcp start
FreeBSD:
# /usr/local/etc/rc.d/apachecp.sh start
Step 7. Starting ImageMaker
Start ImageMaker if your Parallels H-Sphere is integrated with Parallels SiteStudio, for Linux & FreeBSD:
# /hsphere/shared/SiteStudio/imaker.sh start
Step 8. Checking the Version of Parallels H-Sphere
Check the version of Parallels H-Sphere by executing the following command on your CP box:
# cat ~cpanel/shiva/psoft_config/HS_VERSION
You will see a line similar to this:
HS_VERSION = 3.1.905 Where:
3.1 is the version of Parallels H-Sphere, 905 is the Parallels H-Sphere build.
Please contact support at http://www.parallels.com/support/hsphere/ and inform them
C H A P T E R 5
Post-Upgrade Issues
about the upgrade. This is required to get appropriate support from PSoft. Also make sure you meet the following requirements:
1 Customization. If you have custom Parallels H-Sphere templates, you may
probably need to update them according to changes introduced in this version.
More in the section Template Customization of Parallels H-Sphere Customization
Guide. 2 Ownership. In Parallels H-Sphere HTML pages, images, Javascript and CSS files
and respective directories have cpanel:httpdcp ownership. Parallels H-Sphere
updater checks and automatically sets correct ownership and permissions on
respective default and custom files and directories. Please make sure however that
newly created custom files have correct ownership and permissions (this does not
relate to Parallels H-Sphere packages). 3 Web Payments. If you are updating from Parallels H-Sphere versions earlier than
2.5 Beta 1, please update the format of instant payment notification URL in affected
Web payment systems settings. About Web payment instant notification URL read
in the section Web Payment Systems Manager of Parallels H-Sphere Administrator
Guide. 4 Web traffic calculation and log rotation. Parallels H-Sphere 2.5 Beta 1 and up
introduces a completely different approach in Web traffic calculation and log
rotation. Now it takes into account both incoming and outgoing traffic. Therefore,
after you upgrade from versions earlier than 2.5 Beta 1, your clients may find their
traffic increased. 5 VPS: After you have updated Parallels H-Sphere, please also make sure you run
Steps 3-8 of the Parallels H-Sphere VPS update instruction. For this, refer to the
section Updating Parallels H-Sphere Virtual Private Servers of Adding New
H-Sphere Servers and Services guide. 6 IMP Horde (Webmail). Having updated the package, make sure to migrate your
Horde histories data into a separate table, located in Horde database as described
at http://hsphere.parallels.com/misc/horde_update.html. 7 DBD::mysql Perl driver. If you want to update DBD::mysql driver or system Perl
version, make sure to execute the script that updates DBD::mysql driver as
described at http://hsphere.parallels.com/misc/socket_location_mysql_server.html. 8 DNS Zone Duplication (Update from Parallels H-Sphere 2.4.x). If during the
Parallels H-Sphere update DNS zone duplication takes place, Bind update from 8.x
to 9.3.x will be skipped. Then, after the Parallels H-Sphere update is over, you need
to resolve the DNS zone duplication problem, run the updater again and choose the
hspackages option in the update script to update Bind. 9 Set up Kronolith Reminders: If you use Kronolith reminders, make sure to set
them up according to
http://wiki.horde.org/KronolithReminders?Horde=b80c80a948f71e51023fe0c5d7584
7bc&referrer=HowTo.
Before requesting Parallels H-Sphere installation, make sure to install one of the
Operating System
Supported OS Version
RedHat Enterprise Linux
3.x, 4.x
4.x (x86_64)
5.x; 5.x (x86_64)
CentOS
3.x, 4.x
4.x (x86_64)
5.x; 5.x (x86_64)
White Box Enterprise Linux
3.x, 4.x
4.x
FreeBSD
5.5 (except for CP server)
6.1
6.2
C H A P T E R 6
Appendix A. Supported Operating Systems
following operating systems:
Important:
1. By Supported Operating System we assume a 32-bit system, if not specified otherwise.
2. We claim Parallels H-Sphere support on WhiteBox OS, assuming it is a RedHat Enterprise Linux clone. However, we do not test Parallels H-Sphere on WhiteBox servers.
3. CP installed on a server with 64-bit operating system requires glibc 32-bit compatibility library.
Parallels H-Sphere is installed to the /hsphere directory.
C H A P T E R 7
Appendix B. HDD Partitioning
We recommend dedicating a separate partition for the Parallels H-Sphere installation directory and mount it as /hsphere.
# mkdir -p /hsphere # chmod 755 /hsphere
Parallels H-Sphere directory can be located on any other partition as well. However, we do not recommend installing Parallels H-Sphere to the root / partition. Having Parallels H-Sphere on the root partition may cause certain problems. For instance, if disk quota gets damaged, you cannot repair it without server reboot and fsck check in the single user mode.
If your Parallels H-Sphere installation directory is to be located on another partition, for example, /usr/hsphere on the /usr partition, the /hsphere symlink to this directory must be anyway created:
# mkdir -p /usr/hsphere # ln -s /usr/hsphere /hsphere # chmod 755 /usr/hsphere
Important: Do not create /hsphere as a symlink to another partition on servers with FreeBSD 5.3 and up. Allocate the separate /hsphere partition instead. If this is impossible, use the nullfs partitioning for this purpose.
There are no more requirements to partitioning the servers, just make sure there is enough disk space to store user and other Parallels H-Sphere data.
You cant customize some major service configuration files (for Web, mail, DNS,
Service
ctemplate s option
Default Templates
Custom Templates
CP Apache
httpdcp
/hsphere/pkg/scripts /templates/cpapache/ httpd.conf.tmpl.defa
ult
/hsphere/local/home/cpanel/apac
he/etc/httpd.conf.tmpl.custom
CP Apache Extra Configs
httpdcp _extra
/hsphere/local/home/ cpanel/apache/conf/e xtra/*.conf.tmpl.def
ault
/hsphere/local/home/cpanel/apac he/conf/extra/*.conf.tmpl.custo
m
Web Apache
httpd httpd2
/hsphere/pkg/scripts /templates/hs­31/apache/httpd.conf
.tmpl.default
/hsphere/pkg/scripts /templates/hs­31/apache/httpd2.con
f.tmpl.default
/hsphere/pkg/scripts /templates/hs­31apache/lsrv.conf.t
mpl.default
/hsphere/local/config/httpd/lsr
v.conf.tmpl.custom
/hsphere/local/config/httpd/htt
pd.conf.tmpl.custom
/hsphere/local/config/httpd2/ls
rv.conf.tmpl.custom
/hsphere/local/config/httpd2/ht
tpd.conf.tmpl.custom
C H A P T E R 8
Appendix C. Customizing Server Configuration Files By Means of Templates
databases, etc.) directly, as your changes in these files will be overwritten with a consequent Parallels H- Sphere update! Instead, you need to create config file templates by means of the hsphere-update wrapper and customize these templates instead of default config files.
32 Appendix C. Customizing Server Configuration Files By Means of Templates
Extra Configs
httpd_e xtra httpd2_ extra
Apache 1.3:
/hsphere/pkg/scripts /templates/hs­31/apache/extra.defa ult/*.conf.tmpl.defa
ult
Apache 2.2:
/hsphere/pkg/scripts /templates/hs­31/apache/extra2.def ault/*.conf.tmpl.def
ault
Apache 1.3:
/hsphere/local/config/httpd/ext
ra/*.conf.tmpl.custom Apache 2.2:
/hsphere/local/config/httpd2/ex
tra/*.conf.tmpl.custom
PHP 4
php
/hsphere/local/config/httpd/p hp5/php.ini.tmpl /hsphere/local/config/httpd2/ php5/php.ini.tmpl
/hsphere/local/config/httpd/php4/php.ini.tm pl.custom /hsphere/local/config/httpd2/php4/php.ini.t mpl.custom
PHP 5
php
/hsphere/local/config/httpd/p hp5/php.ini.tmpl /hsphere/local/config/httpd2/ php5/php.ini.tmpl
/hsphere/local/config/httpd/php5/php.ini.tm pl.custom /hsphere/local/config/httpd2/php5/php.ini.t mpl.custom (HS 3.1+)
FTP
ftpd
/hsphere/pkg/scripts /templates/proftpd/s hared.proftpd.conf.t
mpl.default
/hsphere/pkg/scripts /templates/proftpd/l ocal.proftpd.conf.tm
pl.default
/hsphere/local/config/ftpd/prof
tpd.conf.tmpl.custom
/hsphere/shared/config/ftpd/pro
ftpd.conf.tmpl.custom
MySQL
mysql
Linux: /hsphere/pkg/scripts/templat es/Linux/my.cnf_tmpl.defaul t FreeBSD: /hsphere/pkg/scripts/templat es/FreeBSD/my.cnf_tmpl.de fault
/hsphere/local/config/mysql/my.
cnf_tmpl.custom
Appendix C. Customizing Server Configuration Files By Means of Templates 33
Postgre SQL
pgsql
Linux:
/hsphere/pkg/scripts /templates/Linux/pos tgresql.conf_tmpl.de
fault
FreeBSD:
/hsphere/pkg/scripts /templates/FreeBSD/p ostgresql.conf_tmpl.
default
/hsphere/local/config/pgsql/pos
tgresql.conf_tmpl.custom
DNS
named
/hsphere/pkg/scripts /templates/named/nam
ed.conf.tmpl.default
/etc/named.conf.tmpl.custom /etc/resolv.conf.custom
Note: In Bind versions before 9.3.3rc1, custom template for /etc/resolv.conf is to be touched manually.
You can customize config file templates by means of Parallels H-Sphere updater, provided you have not customized your templates already. For this purpose two new options are added to the hspackages wrapper of the Parallels H-Sphere update script:
hspackages ctemplates=[OPTIONS] - Place custom templates for comma-
separated list of services into predefined locations if custom templates are not there
already. hspackages edit=IP:/path/to/custom/template - Edit custom template
on a specified server in a specified location. Important:
If you run the hspackages ctemplates command without options, it will create custom templates on all related servers of the Parallels H-Sphere cluster! To specify particular servers where custom config templates should be created, please use the extended syntax of the hspackages command. For example, to create PHP custom config templates only on the physical boxes 192.168.1.10 and 192.168.1.11, run: hspackages ctemplates=php ips=192.168.1.10,192.168.1.11 The hspackages ctemplates command should be run only once, in order to create custom config templates! Then you customize these files according to your needs. Next time you run it, it will prompt re-creating your custom config templates, thus you may lose your customization! The only exclusion when you need to run hspackages ctemplates again is when a coming version of the hsphere-update package contains updates of default config templates. You will be specially notified of this in the respective update notes.
34 Appendix C. Customizing Server Configuration Files By Means of Templates
In this chapter:
CP Apache ........................................................................................................ 34
Extra CP Apache Configs .................................................................................. 35
Apache .............................................................................................................. 36
Extra Apache Configs ........................................................................................ 37
PHP 4 ................................................................................................................ 38
PHP 5 ................................................................................................................ 39
FTP ................................................................................................................... 40
MySQL .............................................................................................................. 41
PostgreSQL ....................................................................................................... 41
DNS .................................................................................................................. 42
Other Files Included into Parallels H-Sphere Packages..................................... 43
CP Apache
Default CP Apache httpd.conf template is included into the hsphere-update and installed here: /hsphere/pkg/scripts/templates/cpapache/httpd.conf.tmpl.default
To customize the template: 1 Create custom config template if required. Otherwise, skip this step.
1. Download Parallels H-Sphere updater for your version, e.g.:
wget
http://download.hsphere.parallels.com/shiv/HS/releases/U31.0/U
31.0b2/U31.0b2
2. Run Parallels H-Sphere update script for your version, e.g.:
sh ./U31.0b2
3. Execute the hspackages wrapper with the ctemplates=httpdcp option:
hspackages ctemplates=httpdcp [OPTIONS]
Custom template will be placed into the following location:
/hsphere/local/home/cpanel/apache/etc/httpd.conf.tmpl.custo
m
2 Edit the
/hsphere/local/home/cpanel/apache/etc/httpd.conf.tmpl
.custom file according to your needs.
3 To immediately apply changes, run the conf file generating script
which is as a rule executed in the postinstall section of the package:
/hsphere/shared/scripts/apache-restart
Appendix C. Customizing Server Configuration Files By Means of Templates 35
Extra CP Apache Configs
Parallels H-Sphere allows to customize some extra Apache config files for CP. They are located in the /hsphere/local/home/cpanel/apache/conf/extra/ directory:
httpd-autoindex.conf - directives controlling the display of server-generated
directory listings
httpd-cache.conf - directived providing HTTP content cache configuration  httpd-info.conf - Apache status-related directive blocks  httpd-languages.conf - directives which the provide mod_mime and
mod_negotiation modules global configuration vh-ssl-default.conf - Global SSL default VirtualHost configuration
These extra config files are provided for easier configuration of Apache modules, such as mod_cache, mod_security, etc.
After the config file customization, the correspondent *.tmpl.custom files will be created in the same directory:
1 Create custom config template if required. Otherwise, skip this step.
1. Download Parallels H-Sphere updater for Parallels H-Sphere 3.1 version, e.g.:
wget
http://download.hsphere.parallels.com/shiv/HS/releases/U31.0/U
31.0b2/U31.0b2
2. Run Parallels H-Sphere update script for your version, e.g.:
sh ./U31.0b2
3. Execute the hspackages wrapper with the ctemplates=httpdcp_extra option:
hspackages ctemplates=httpdcp_extra [OPTIONS]
After that, custom templates /hsphere/local/home/cpanel/apache/conf/extra/*.tmpl.custom will be created.
2 Edit the
/hsphere/local/home/cpanel/apache/conf/extra/*.tmpl.c
ustom files according to your needs:
To immediately apply changes, restart Apache:
/hsphere/shared/scripts/apache-restart
36 Appendix C. Customizing Server Configuration Files By Means of Templates
Apache
Default config Apache templates are included into the hsphere-update package and installed in the following locations:
/hsphere/pkg/scripts/templates/hs-
31/apache/httpd.conf.tmpl.default
/hsphere/pkg/scripts/templates/hs-
31/apache/httpd2.conf.tmpl.default
/hsphere/pkg/scripts/templates/hs-
31apache/lsrv.conf.tmpl.default
To customize them, perform:
1 Create custom config template if required. Otherwise, skip this step.
1. Download Parallels H-Sphere updater for your version, e.g.:
wget
http://download.hsphere.parallels.com/shiv/HS/releases/U31.0/U
31.0b2/U31.0b2
2. Run Parallels H-Sphere update script for your version, e.g.:
sh ./U31.0b2
3. Execute the hspackages wrapper with the ctemplates=httpd option for Apache
1.3 and/or ctemplates=httpd2 option for Apache 2.2:
hspackages ctemplates=httpd [OPTIONS]
Custom templates will be placed into the following locations:
/hsphere/local/config/httpd/lsrv.conf.tmpl.custom /hsphere/local/config/httpd/httpd.conf.tmpl.custom /hsphere/local/config/httpd2/lsrv.conf.tmpl.custom /hsphere/local/config/httpd2/httpd.conf.tmpl.custom
2 Edit the .custom files according to your needs:
/hsphere/local/config/httpd/lsrv.conf.tmpl.custom /hsphere/local/config/httpd/httpd.conf.tmpl.custom
3 To immediately apply changes, run the conf file generating script
which is as a rule executed in the postinstall section of the package:
/hsphere/shared/scripts/apache-restart
Customizing /hsphere/shared/apache/htdocs/index.html
If you need to leave /hsphere/shared/apache/htdocs/index.html unchanged after the update, create the following file:
touch /hsphere/local/config/httpd/index.html.custom
If the latter file exists, then you can customize your index.html file without the risk of its being overwritten.
Appendix C. Customizing Server Configuration Files By Means of Templates 37
Extra Apache Configs
Parallels H-Sphere allows to customize some extra Apache config files, such as: httpd-autoindex.conf - directives controlling the display of server-generated
directory listings
httpd-cache.conf - directived providing HTTP content cache configuration
(Apache 2.2 only)
httpd-gzip.conf - directives for global settings provided by the mod_gzip
module (Apache 1.3 only)
httpd-info.conf - Apache status-related directives  httpd-languages.conf - directives which the provide mod_mime and
mod_negotiation modules global configuration
httpd-security.conf - ModSecurity configuration options  httpd-security2.conf - ModSecurity v.2 configuration options (Apache 2.2
only)
vh-ssl-default.conf - global SSL default VirtualHost configuration Default templates *.tmpl.defaiult for these config files are installed with
hsphere-updater to the following directories: Apache 1.3: /hsphere/pkg/scripts/templates/hs-
31/apache/extra.default/ Apache 2.2: /hsphere/pkg/scripts/templates/hs-
31/apache/extra2.default/ After Parallels H-Sphere 3.1 update, the respective custom .tmpl.custom files will be
created in the following directories: Apache 1.3: /hsphere/local/config/httpd/extra/
Apache 2.2: /hsphere/local/config/httpd2/extra/
1 Create custom config template if required. Otherwise, skip this step.
1. Download Parallels H-Sphere updater for Parallels H-Sphere 3.1 version, e.g.:
wget
http://download.hsphere.parallels.com/shiv/HS/releases/U31.0/U
31.0b2/U31.0b2
2. Run Parallels H-Sphere update script for your version, e.g.:
sh ./U31.0b2
3. Execute the hspackages wrapper with the ctemplates=httpd_extra option:
hspackages ctemplates=httpd_extra [OPTIONS]
After that, custom templates *.tmpl.custom will be created in respective directories.
2 Edit the *.tmpl.custom files according to your needs:
38 Appendix C. Customizing Server Configuration Files By Means of Templates
Apache 1.3: /hsphere/local/config/httpd/extra/*.tmpl.custom Apache 2.2: /hsphere/local/config/httpd2/extra/*.tmpl.custom
3 To immediately apply changes, restart Apache:
/hsphere/shared/scripts/apache-restart
PHP 4
PHP 4 config files are located at:
/hsphere/local/config/httpd/php4/php.ini.tmpl.custom (when PHP4
uses fastcgi, for all Apache versions)
/hsphere/local/config/httpd/php4/php.ini.tmpl.custom (when libphp5
is used, for Apache 1.x)
/hsphere/local/config/httpd2/php4/php.ini.tmpl.custom (when
libphp5 is used, for Apache 2.x)
To customize PHP 4 config files:
1 Create custom config template if required. Otherwise, skip this step.
1. Download Parallels H-Sphere updater for your version, e.g.:
wget
http://download.hsphere.parallels.com/shiv/HS/releases/U31.0/U
31.0b2/U31.0b2
2. Run Parallels H-Sphere update script for your version, e.g.:
sh ./U31.0b2
3. Execute the hspackages wrapper with the ctemplates=php option:
hspackages ctemplates=php [OPTIONS]
Custom templates will be placed into the following location:
/hsphere/local/config/httpd2/php4/php.ini.tmpl.custom /hsphere/local/config/httpd/php4/php.ini.tmpl.custom
2 Edit the above mentioned tmpl.custom files according to your
needs.
3 To immediately apply changes, copy:
cp -p /hsphere/local/config/httpd/php4/php.ini.tmpl.custom /hsphere/local/config/httpd/php4/php.ini cp -p /hsphere/local/config/httpd2/php4/php.ini.tmpl.custom /hsphere/local/config/httpd2/php4/php.ini
4 Restart Apache service
Appendix C. Customizing Server Configuration Files By Means of Templates 39
PHP 5
PHP 5 config files are located:
/hsphere/local/config/httpd/php5/php.ini.tmpl.custom (when PHP4
uses fastcgi, for all Apache versions)
/hsphere/local/config/httpd/php5/php.ini.tmpl.custom (when libphp5
is used, for Apache 1.x)
/hsphere/local/config/httpd2/php5/php.ini.tmpl.custom (when libphp5
is used, for Apache 2.x)
To customize PHP 5 config files:
1 Create custom config template if required. Otherwise, skip this step.
1. Download Parallels H-Sphere updater for your version, e.g.:
wget
http://download.hsphere.parallels.com/shiv/HS/releases/U31.0/U
31.0b2/U31.0b2
2. Run Parallels H-Sphere update script for your version, e.g.:
sh ./U31.0b2
3. Execute the hspackages wrapper with the ctemplates=php option:
hspackages ctemplates=php [OPTIONS]
Custom templates will be placed into the following location:
/hsphere/local/config/httpd/php5/php.ini.tmpl.custom /hsphere/local/config/httpd2/php5/php.ini.tmpl.custom
2 Edit the above mentioned tmpl.custom files according to your
needs.
3 To immediately apply changes, copy:
cp -p /hsphere/local/config/httpd/php5/php.ini.tmpl.custom /hsphere/local/config/httpd/php5/php.ini cp -p /hsphere/local/config/httpd2/php5/php.ini.tmpl.custom /hsphere/local/config/httpd2/php5/php.ini
4 Restart Apache service
40 Appendix C. Customizing Server Configuration Files By Means of Templates
FTP
FTP config file templates are included into the hsphere-update package and installed in the following locations:
/hsphere/pkg/scripts/templates/proftpd/shared.proftpd.conf.tmpl.d
efault
/hsphere/pkg/scripts/templates/proftpd/local.proftpd.conf.tmpl.d
efault
To customize these templates, perform:
1 Create custom config template if required. Otherwise, skip this step.
1. Download Parallels H-Sphere updater for your version, e.g.:
wget
http://download.hsphere.parallels.com/shiv/HS/releases/U31.0/U
31.0b2/U31.0b2
2. Run Parallels H-Sphere update script for your version, e.g.:
sh ./U31.0b2
3. Execute the hspackages wrapper with the ctemplates=ftpd option:
hspackages ctemplates=ftpd [OPTIONS]
Custom templates will be placed into the following locations:
/hsphere/local/config/ftpd/proftpd.conf.tmpl.custom /hsphere/shared/config/ftpd/proftpd.conf.tmpl.custom
2 Edit the .custom files according to your needs:
/hsphere/local/config/ftpd/proftpd.conf.tmpl.custom /hsphere/shared/config/ftpd/proftpd.conf.tmpl.custom
3 To immediately apply changes, run:
/hsphere/shared/config/ftpd/configure-proftpd.sh
4 Restart FTP service
Appendix C. Customizing Server Configuration Files By Means of Templates 41
MySQL
MySQL config file templates are included into the hsphere-update package and installed in the following locations:
Linux: /hsphere/pkg/scripts/templates/FreeBSD/my.cnf_tmpl.default FreeBSD: /hsphere/pkg/scripts/templates/Linux/my.cnf_tmpl.default
To customize these templates, perform:
1 Create custom config template if required. Otherwise, skip this step.
1. Download Parallels H-Sphere updater for your version, e.g.:
wget
http://download.hsphere.parallels.com/shiv/HS/releases/U31.0/U
31.0b2/U31.0b2
2. Run Parallels H-Sphere update script for your version, e.g.:
sh ./U31.0b2
3. Execute the hspackages wrapper with the ctemplates=mysql option:
hspackages ctemplates=mysql [OPTIONS]
Custom templates will be placed into the following location: /hsphere/local/config/mysql/my.cnf_tmpl.custom
2 Edit the /hsphere/local/config/mysql/my.cnf_tmpl.custom
file according to your needs.
3 To immediately apply changes, run the conf file generating script
which is as a rule executed in the package postinstall section:
/hsphere/local/config/mysql/scripts/config_mysql
PostgreSQL
PostgreSQL config file templates are included into the hsphere-update package and installed in the following locations:
Linux:
/hsphere/pkg/scripts/templates/FreeBSD/postgresql.conf_tmpl.defa
ult
FreeBSD:
/hsphere/pkg/scripts/templates/Linux/postgresql.conf_tmpl.defaul
t
To customize these templates, perform:
1 Create custom config template if required. Otherwise, skip this step.
1. Download Parallels H-Sphere updater for your version, e.g.:
42 Appendix C. Customizing Server Configuration Files By Means of Templates
wget
http://download.hsphere.parallels.com/shiv/HS/releases/U31.0/U
31.0b2/U31.0b2
2. Run Parallels H-Sphere update script for your version, e.g.:
sh ./U31.0b2
3. Execute the hspackages wrapper with the ctemplates=pgsql option:
hspackages ctemplates=pgsql [OPTIONS]
Custom templates will be placed into the following location: /hsphere/local/config/pgsql/postgresql.conf_tmpl.custom
2 Edit the
/hsphere/local/config/pgsql/postgresql.conf_tmpl.cust
om file according to your needs.
Important: By default, PostgreSQL listens on localhost (parameter virtual_host=127.0.0.1 in config file). Change this parameter if required.
3 To immediately apply changes, run the conf file generating script
which is as a rule executed in the package postinstall section:
/hsphere/local/config/pgsql/scripts/config_pgsql
DNS
/etc/named.conf
Default template is located at /hsphere/pkg/scripts/templates/named/named.conf.tmpl.default
1 Create custom config template if required. Otherwise, skip this step.
1. Download Parallels H-Sphere updater for your version, e.g.:
wget
http://download.hsphere.parallels.com/shiv/HS/releases/U31.0/U
31.0b2/U31.0b2
2. Run Parallels H-Sphere update script for your version, e.g.:
sh ./U31.0b2
3. Execute the hspackages wrapper with the ctemplates=named option:
hspackages ctemplates=named [OPTIONS]
Custom template will be placed into the following location: /etc/named.conf.tmpl.custom
2 Edit the /etc/named.conf.tmpl.custom file according to your
needs.
3 To immediately apply changes, run the conf file generating script
which is as a rule executed in the postinstall section of the package:
Appendix C. Customizing Server Configuration Files By Means of Templates 43
/hsphere/local/config/bind/scripts/config_bind
/etc/resolv.conf
To leave /etc/resolv.conf unchanged during the update (e.g., when MyDNS is used), perform:
touch /etc/resolv.conf.custom
If the latter file exists, then you can customize your /etc/resolv.conf file without the risk of its being overwritten.
Other Files Included into Parallels H-Sphere Packages
WARNING: It is not recommended that you customize the files included into Parallels H-Sphere packages by yourself. Any alterations made to them are at your own risk!
Besides customization of some major service configuration files (for Web, mail, DNS, databases, etc.), we have implemented for your convenience a possibility to customize other files included into Parallels H-Sphere packages. For this, we have created a configuration file /hsphere/local/config/customs/customs.conf and a special template /hsphere/local/config/customs/customs.conf.tmpl that will help you to save customized Parallels H-Sphere packages files during future updates.
To customize a file included into Parallels H-Sphere Package and save the changes:
1 Make necessary changes to the file you want to customize. 2 Copy a template of custom files to a configuration file:
cp -p /hsphere/local/config/customs/customs.conf.tmpl /hsphere/local/config/customs/customs.conf
3 Go to the customs.conf file 4 Add the full path to the customized file(-s) under the mask of the
relevant package, e.g.:
[hsphere-imap-h2.5] /etc/rc.d/init.d/courier-imapd /etc/rc.d/init.d/courier-imapd-ssl /hsphere/local/config/mail/imap/etc/imapd /hsphere/local/config/mail/imap/etc/imapd-ssl
Please note that during the package updates all custom files will be saved in the /hsphere/local/config/customs/$package_mask/ directory. The default files of Parallels H-Sphere packages, in their turn, will be stored at /hsphere/local/config/customs/default/$package_mask/. The above mentioned locations store the latest versions of both custom and default files, no matter custom or default file is being used.
This table contains codes for all Linux/FreeBSD operating systems supported by
Operating System
OSCODE
Download Location
RedHat EL 3, CentOS 3.x, White Box EL 3.x
RHES3
http://download.hsphere.parallels.c
om/shiv/HS/RHES3
RedHat EL 4, CentOS 4.x, White Box EL 4.x
RHES4
http://download.hsphere.parallels.c
om/shiv/HS/RHES4
RedHat EL 4, CentOS 4.x, White Box EL 4.x (x86_64)
RHES4_64
http://download.hsphere.parallels.c
om/shiv/HS/RHES4_64
RedHat EL 5, CentOS 5.x
RHES5
http://download.hsphere.parallels.c
om/shiv/HS/RHES5
RedHat EL 5, CentOS 5.x (x86_64)
RHES5_64
http://download.hsphere.parallels.c
om/shiv/HS/RHES5_64
FreeBSD 5.3
FBSD53
http://download.hsphere.parallels.c
om/shiv/HS/FBSD53
FreeBSD 5.4
FBSD54
http://download.hsphere.parallels.c
om/shiv/HS/FBSD54
FreeBSD 5.5
FBSD55
http://download.hsphere.parallels.c
om/shiv/HS/FBSD55
FreeBSD 6.0
FBSD60
http://download.hsphere.parallels.c
om/shiv/HS/FBSD60
FreeBSD 6.1
FBSD61
http://download.hsphere.parallels.c
om/shiv/HS/FBSD61
FreeBSD 6.2
FBSD62
http://download.hsphere.parallels.c
om/shiv/HS/FBSD62
C H A P T E R 9
Appendix D. Download Locations
Parallels H-Sphere and links to the directories on the
http://download.hsphere.parallels.com website where you can download packages
required by Parallels H-Sphere.
In addition to http://download.hsphere.parallels.com, you can configure mirroring from the site http://download2.hsphere.parallels.com located in Europe. Follow the instructions in the section below.
Appendix D. Download Locations 45
In this chapter:
Mirror Server for Parallels H-Sphere Downloads ............................................... 46
46 Appendix D. Download Locations
Mirror Server for Parallels H-Sphere Downloads
If you have 2 and more boxes with the same operating system or you want to speed up package downloads, you can create a mirror server and in the updater set an alternative URL for package downloads.
Important: The alternative location for downloading installation and update scripts, and packages from Europe is http://download2.hsphere.parallels.com.
You can choose http://download2.hsphere.parallels.com for Parallels H-Sphere installation or update by setting the mirror parameter to [1] in the installation/update script. You can also download Parallels H-Sphere system packages manually from the mirror server http://download2.hsphere.parallels.com/shiv/HS/ and its respective subdirectories.
On our website we have created a directory hierarchy for supported OS at
http://www.psoft.net/shiv/HS/releases/U31.0/pkgs
This hierarchy is formed by the cron script on http://download.hsphere.parallels.com based on the files with package listing (pkglist, sspkglist, subpkglist, pkglist.priv).
To create a mirror: 1 Configure apache on the box to be used as a mirror, for example:
URL: http://download2.hsphere.parallels.com/HS will correspond to DocumentRoot: /var/www/psoft.net/HS/.
2 Specify the OSCODE (the code of the operating system) you are
configuring mirror for. To do this, run on every Parallels H-Sphere cluster box:
/hsphere/shared/bin/oscode
3 Create corresponding sub-directories in DocumentRoot for the
OSCODE(s) you arrange mirroring for. For instance, if you need to create mirroring for boxes with OSCODE RHES4 i FBSD54, run:
mkdir -m 0755 /var/www/psoft.net/HS/RHES4 mkdir -m 0755 /var/www/psoft.net/HS/FBSD54
4 Create the corresponding cron tasks. For instance, mirroring for boxes
with RHES4 and FBSD54 oscode for HS 3.0:
Appendix D. Download Locations 47
0 5 * * * (cd /var/www/psoft.net/HS/RHES4/; wgetmirrorlimit­rate=45k -np -nHcut-dirs=7 -erobots=off http://download.hsphere.parallels.com/shiv/HS/releases/U3.0/pk gs/RHES4/)0 5 * * * (cd /var/www/psoft.net/HS/FBSD54/; wget mirrorlimit-rate=45k -np -nHcut-dirs=7 -erobots=off http://download.hsphere.parallels.com/shiv/HS/releases/U3.0/pk gs/FBSD54/)
Note: you can change the wget format. For instance, if you dont have VPS servers, you can run wget withreject=hsphere-vps parameter (-­reject=LIST sets comma-separated list of rejected extensions).
5 On all boxes where mirror server will be used, execute:
echo http://download2.hsphere.parallels.com/HS >/hsphere/shared/etc/mirror
Notes: 1 If you want to cancel mirroring and download packages from the
http://download.hsphere.parallels.com server, run:
rm -f /hsphere/shared/etc/mirror
2 Package lists (pkglist, sspkglist, subpkglist, pkglist.priv) are usually
downloadable from download.hsphere.parallels.com.
Loading...