|
Last modified: 27 Dec 2007
Starting with H-Sphere 3.0 RC 4, you can use versions of MySQL/PostgreSQL other than those included
into H-Sphere updater. For instance, when updating to H-Sphere 3.0 with MySQL 5.0.x and Postgres 7.4.x
there may be a necessity to use MySQL 4.1.x included into H-Sphere 2.5.0 or Postgres 8.0.x enabled for
a certain operational system. In such a situtation H-Sphere updater allows excluding default versions of MySQL/PostgreSQL, as well as updating and configuring them by
means of native system package managers.
To make sure CP properly works with such custom MySQL/PostgreSQL versions:
Excluding MySQL/PostgreSQL from H-Sphere 3.0 updater
To exclude the above mentioned packages, run one of the following updater commands:
exclude-mysql=show|add|del
exclude-postgresql=show|add|del
If custom MySQL/PostgreSQL has to be set not for all MySQL/PostgreSQl logical servers, set a list of specific IPs.
Advanced MySQL/PostgreSQL configuration to support non-default MySQL/PostgreSQL versions
To add an H-Sphere configuration to MySQL and PostgreSQl services:
For MySQL:
- Create ~mysql/.my.cnf file which contains:
cat ~mysql/.my.cnf
[client]
user=root
password=PASSWORD
- Set necessary file permissions:
chmod 0400 ~mysql/.my.cnf
chown mysql:mysql ~mysql/.my.cnf
- Configure /etc/my.cnf file (if any) according to your needs
For PostgreSQL:
- Create pgsql (FreeBSD) or postgres (Linux) database user, hereafter PGUSER
- If you customize CP PostgreSQL, create wwwuser, i.e. H-Sphere main PostgreSQL database user
- According to PGDATADIR variable (from startup file), create:
$PGDATADIR /global/pg_ps
and add a string in the following format:
user password
- Set permissions:
chown $PGUSER:$PGUSER $PGDATADIR /global/pg_ps
chmod 600 $PGDATADIR /global/pg_ps
- Configure ~$PGDATADIR/pg_hba.conf by setting the list of subnets and providing password
type for validation
- If you customize a CP PostgreSQL, make sure you have correctly set a wwwuser access password
to a database. You can check in the ~cpanel/shiva/psoft_config/hsphere.properties file
- Provide a PostgreSQL logs rotation according to syslog facility specified in ~$PGDATADIR/postgresql.conf configuration file.
Note: to check that MySQL/PgSQL is properly configured, run the following script:
/hsphere/pkg/scripts/uprocedure/dbs_check
|