These steps illustrate how to install the PostgreSQL software in the default directory /usr/local/pgsql. You can also build and install the PostgreSQL binaries on shared storage. See Installing and Configuring PostgreSQL on Shared Storage in the Global Zone or a Zone Cluster.
phys-schost-1# mkdir /glohal/mnt3/postgres
phys-schost-1# chown -R postgres:postgres /glohal/mnt3/postgres
phys-schost-1# su - postgres
phys-schost-1$ gzcat /tmp/postgresql-8.1.0.tar.gz |tar xvf -
phys-schost-1$ PATH=$PATH:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin phys-schost-1$ export PATH
phys-schost-1$ LD_LIBRARY_PATH=/usr/sfw/lib:/usr/local/lib:/usr/lib:/opt/csw/lib phys-schost-1$ export LD_LIBRARY_PATH
phys-schost-1$ gzcat /tmp/postgresql-8.1.0.tar.gz |tar xvf - phys-schost-1$ cd /global/mnt3/postgres/build/postgresql-8.1.0 phys-schost-1$ ./configure
phys-schost-1$ gmake
If you use gcc to build the postgres binaries, build them in a failover file system.
phys-schost-1$ gmake check
phys-schost-1$ su
This example assumes the following:
The compiler is gcc, located in /usr/sfw/bin.
ar is located in /usr/ccs/bin.
phys-schost-1# PATH=$PATH:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin phys-schost-1# export PATH
phys-schost-1# LD_LIBRARY_PATH=/usr/sfw/lib:/usr/local/lib:/usr/lib:/opt/csw/lib phys-schost-1# export LD_LIBRARY_PATH
phys-schost-1# gmake install
phys-schost-1# scp -rp /usr/local/pgsql phys-schost-2:/usr/local
phys-schost-1# exit
phys-schost-1% gmake clean
Next Steps
Perform the steps in Example: Enabling the PostgreSQL Software to Run in the Cluster to complete installation and configuration of PostgreSQL.