The instructions in Installing and Configuring PostgreSQL on Shared Storage in the Global Zone install the PostgreSQL software on shared cluster storage. You can also install this software in the default directory /usr/local/pgsql.
To install the PostgreSQL software in the default directory, perform the steps provided in the following example procedures:
LExample: Building and Installing the PostgreSQL Software in the Default Directory in the Global Zone
Example: Enabling the PostgreSQL Software to Run in the Cluster
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.
Log in as the PostgreSQL user.
phys-schost-1# su - postgres |
Expand the software tar file.
phys-schost-1$ gzcat /tmp/postgresql-8.1.0.tar.gz |tar xvf - |
Add the C compiler and ar to your PATH.
phys-schost-1$ PATH=$PATH:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin phys-schost-1$ export PATH |
Add the C compiler and readline libraries to your LD_LIBRARY_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 |
Install the source and configure the build.
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 |
Build the PostgreSQL binaries.
phys-schost-1$ gmake |
If you use gcc to build the postgres binaries, build them in a failover file system.
Run the PostgreSQL regression tests.
phys-schost-1$ gmake check |
Log back in as root.
phys-schost-1$ su |
Add the C compiler and ar to your PATH.
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 |
Add the C compiler and readline libraries to your LD_LIBRARY_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 |
Install the binaries.
phys-schost-1# gmake install |
Copy the binaries to the second node.
phys-schost-1# scp -rp /usr/local/pgsql phys-schost-2:/usr/local |
Exit from root access.
phys-schost-1# exit |
Clean the distribution.
phys-schost-1% gmake clean |
Perform the steps in Example: Enabling the PostgreSQL Software to Run in the Cluster to complete installation and configuration of PostgreSQL.