Go to main content

Oracle® Solaris Cluster Data Service for PostgreSQL Guide

Exit Print View

Updated: June 2017
 
 

Example: Building and Installing the PostgreSQL Software on Shared Storage

These steps illustrate how to install the PostgreSQL software on shared storage. You can also build and install the PostgreSQL binaries in the default directory /usr/local/pgsql.

  1. Create the home directory for PostgreSQL user.
    phys-schost-1# mkdir /glohal/mnt3/postgres
  2. Change the ownership of the postgres directory.
    phys-schost-1# chown -R postgres:postgres /glohal/mnt3/postgres
  3. Log in as the PostgreSQL user.
    phys-schost-1# su - postgres
  4. Set up the build environment.
    1. Create a build directory.
      phys-schost-1$ mkdir build
      phys-schost-1$ cd build
    2. 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
  5. Install the source and configure the build.
    phys-schost-1$ gzcat /tmp/postgresql-8.1.0.tag.gz | tar xvf -
    phys-schost-1$ cd /global/mnt3/postgres/build/postgresql-8.1.0
    phys-schost-1$ ./configure --prefix=/global/mnt3/postgres/postgresql-8.1.0
  6. Build the PostgreSQL binaries.
    phys-schost-1$ gmake

    If you use gcc to build the postgres binaries, build them in a failover file system.

  7. Run the PostgreSQL regression tests.
    phys-schost-1$ gmake check
  8. Install the PostgreSQL binaries.
    phys-schost-1# gmake install
  9. Clean the distribution.
    phys-schost-1$ gmake clean