@ @


Creating an account

You will need DB server administrator account to install, just like installing PostgreSQL. Add administrator user account, and then set the environment variables.

(list 1)
Adding user account and setting environment variable
# useradd postgres
# su -l postgres
$ set PGDATA=/usr/local/
$ export PGDATA
$ set LD_LIBRARY_PATH=/usr/local/pgsql/lib
In (list 1), install directory is set as "/usr/local/pgsql", and database storage directory is set as "/usr/local/pgsql/data" as an example.


There are two ways of installing PGCluster: "Full Package Version" and "Patch Version" which is a patch to PostgreSQL. Full package has about 12MB. If there is a problem in downloading "Full Package Version", try "Patch Version".

Installing "Full Package Version"

Unpack the downloaded tar file to a directory.

Unpack the "Full Package Version"
# cd /usr/local/src
# tar -zxvf /tmp/pgcluster-1.3.x.tar.gz
# chown -R postgres.postgres pgcluster-1.3.x

Install Cluster DB Server, Replication Server & Load Balancer
$ cd /usr/local/src/pgcluster-1.3.x
$./configure --enable-thread-safety
$ make
$ su
# make install
$chown -R postgres /usr/local/pgsql

(2)Initialize DB
$ su
# adduser postgres
# su - postgres
$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data

Installing "Patch Version"

Get PostgreSQL 8.0.1, and unpack at a directory.
Then unpack pgcluster-1.3.x "Patch Version" at the same directory.
Apply the patch to the PostgreSQL source using patch command.
Unpack the "Patch Version"
# cd /usr/local/src
# tar -zxvf /tmp/postgresql-8.0.1.tar.gz
# chown -R postgres.postgres postgresql-8.0.1
# su -l postgres
$ cd /usr/local/src/postgresql-8.0.1
$ tar -zxvf /tmp/pgcluster-1.3.-patch.tar.gz
$ patch -p1 < pgcluster-1.3.-patch

The rest procedure is same as the "Full Package Version" procedure.