Sun Cluster Data Service for PostgreSQL Guide for Solaris OS

Procedure How to Install and Configure PostgreSQL in a Global Zone


Note –

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


For a complete example of deployment in a global zone, see Appendix B, Deployment Example: Installing PostgreSQL in the Global Zone.

Before You Begin

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

The following assumptions are made:

  1. As superuser create the home directory for the PostgreSQL user on one node.


    # mkdir /global/postgres
    
  2. Add a group for PostgreSQL on every node.


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


    # useradd -u 1000 -g postgres -d /global/postgres -s /usr/bin/ksh postgres
    # chown -R postgres:postgres /global/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=/global/postgres/version
    
  9. Complete, verify and install the build.


    $ gmake
    $ gmake check
    $ gmake install