Example: Building and Installing the PostgreSQL Software
on Shared Storage
These steps illustrate how to install the PostgreSQL software.
You can build and install the PostgreSQL binaries in the default
directory /usr/local/pgsql. Perform the following steps
on both hosts.
-
Log in as the PostgreSQL user to the target environment,
either in the global or the local zone according to your installation.
phys-schost-1# su - postgres
|
-
Set up the build environment by performing the following steps.
-
Create a build directory.
phys-schost-1$ mkdir build
|
-
Add the C compiler to your PATH and set the LD_LIBRARY_PATH.
phys-schost-1$ PATH=$PATH:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin
|
phys-schost-1$ LD_LIBRARY_PATH=/postgres/postgresql-8.3.1: \
/usr/sfw/lib:/usr/local/lib:/usr/lib:/opt/csw/lib
|
phys-schost-1$ export PATH LD_LIBRARY_PATH
|
-
Install the source and configure the build.
phys-schost-1$ gzcat /tmp/postgresql-8.3.1.tag.gz | tar xvf
|
phys-schost-1$ cd /postgres/build/postgresql-8.3.1
|
phys-schost-1$ ./configure --prefix=/postgres/postgresql-8.3.1
|
-
Build the PostgreSQL binaries.
-
Run the PostgreSQL regression tests.
phys-schost-1$ gmake check
|
-
Install the PostgreSQL binaries.
phys-schost-1$ gmake install
|
-
Install the utilities, including pg_standby.
phys-schost-1$ cd contrib
|
phys-schost-1$ gmake install
|
-
Clean the distribution.
phys-schost-1$ gmake clean
|