For a complete example of deployment in the global zone, see Deployment Example: Installing PostgreSQL in the Global Zone or a Zone Cluster.
Before You Begin
Determine the following requirements for the deployment of PostgreSQL with Oracle Solaris Cluster software:
See whether the PostgreSQL version that you need is already installed on each cluster node by searching the most probable root paths to find bin/postmaster:
Root path for PostgreSQL shipped with Oracle Solaris software.
Root path for the PostgreSQL build without a prefix.
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 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 /global/postgres.
The PostgreSQL database cluster will be installed in the same file system as the database software, in the directory /global/postgres/data.
The home directory of the postgres user is /global/postgres.
The PostgreSQL build directory is in /tmp/postgres/version, and the software is already downloaded and extracted in this place.
# mkdir /global/postgres
# groupadd -g 1000 postgres
# useradd -u 1000 -g postgres -d /global/postgres -s /usr/bin/ksh postgres # chown -R postgres:postgres /global/postgres
# su - postgres
$ PATH=$PATH:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin $ export PATH
$ LD_LIBRARY_PATH=/usr/sfw/lib:/usr/local/lib:/usr/lib: $ export LD_LIBRARY_PATH
$ cd /tmp/postgres/version
$ ./configure --prefix=/global/postgres/version
$ gmake $ gmake check $ gmake install