For complete information about installing PostgreSQL, go to http://www.postgresql.org.
For a complete example of deploying in an HA container, see Deployment Example: Installing PostgreSQL in a Non-Global HA Container.
Determine the following requirements for the deployment of PostgreSQL with Sun Cluster:
See if the PostgreSQL version that you need is already installed on each cluster node. by searching the most probable root paths where you find bin/postmaster:
/usr |
Root path for PostgreSQL shipped with Solaris OS. |
/usr/local/psql |
Root path for the PostgreSQL build without a prefix. |
/your-path |
Fully customized root path for PostgreSQL. This is where to place the binaries on the shared storage. A known convention is /path/postgresql-x.y.z. |
Determine the number of PostgreSQL resources to deploy.
Determine which cluster file systems will be used by each PostgreSQL resource.
Make sure that a C compiler, make, and the readline package are installed. These packages are needed to build PostgreSQL from the source code downloads from http://www.postgresql.org .
The following assumptions are made:
The zone postgres-zone is installed and configured on every node.
The compiler gcc and the gmake package are installed in /usr/sfw.
The readline package is installed under /usr/local.
The PostgreSQL database software will be installed on the shared storage, in the directory version in the failover file system /postgres.
The PostgreSQL database cluster will be installed in the same file system as the database software, in the directory /postgres/data.
The home directory of the postgres user is /postgres.
The PostgreSQL build directory is in /tmp/postgres/version, and the software is already downloaded and extracted in this place.
As superuser log in to the zone.
# zlogin pgsql-zone |
Add a group for PostgreSQL.
# groupadd -g 1000 postgres |
Add a user who owns the PostgreSQL installation on every node.
# useradd -u 1000 -g postgres -d /postgres -m -s /usr/bin/ksh postgres |
Switch to the PostgreSQL user.
# su - postgres |
Set your PATH variable.
$ PATH=$PATH:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin $ export PATH |
Set your LD_LIBRARY_PATH variable.
$ LD_LIBRARY_PATH=/usr/sfw/lib:/usr/local/lib:/usr/lib: $ export LD_LIBRARY_PATH |
Switch to your build directory.
$ cd /tmp/postgres/version |
Configure the PostgreSQL build.
$ ./configure --prefix=/postgres/version |
Complete, verify, and install the build.
$ gmake $ gmake check $ gmake install |