Sun Cluster Data Service for PostgreSQL Guide for Solaris OS

Procedure How to Install and Configure PostgreSQL in a Failover Zone


Note –

For complete information about installing PostgreSQL, go to http://www.postgresql.org.


For a complete example of deploying in a failover zone, see Appendix D, Deployment Example: Installing PostgreSQL in a Non-Global Zone.

Before You Begin

Determine the following requirements for the deployment of PostgreSQL with Sun Cluster:

The following assumptions are made:

  1. Log in to the zone.


    # zlogin postgres-zone
    
  2. Add a group for PostgreSQL.


    # groupadd -g 1000 postgres
    
  3. Add a user who owns the PostgreSQL installation on every node.


    # useradd -u 1000 -g postgres -d /postgres -m -s /usr/bin/ksh postgres
    
  4. Switch to the PostgreSQL user.


    # su - postgres
    
  5. Set your PATH variable.


    $ PATH=$PATH:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin
    $ export PATH
    
  6. Set your LD_LIBRARY_PATH variable.


    $ LD_LIBRARY_PATH=/usr/sfw/lib:/usr/local/lib:/usr/lib:
    $ export LD_LIBRARY_PATH
    
  7. Switch to your build directory.


    $ cd /tmp/postgres/version
    
  8. Configure the PostgreSQL build.


    $ ./configure --prefix=/postgres/version
    
  9. Complete, verify, and install the build.


    $ gmake
    $ gmake check
    $ gmake install