JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Cluster Data Service for PostgreSQL Guide     Oracle Solaris Cluster 3.3 3/13
search filter icon
search icon

Document Information

Preface

1.  Installing and Configuring HA for PostgreSQL

A.  Files for Configuring Oracle Solaris Cluster HA for Solaris PostgreSQL Resources

B.  Deployment Example: Installing PostgreSQL in the Global Zone

Target Cluster Configuration

Software Configuration

Assumptions

Installing and Configuring PostgreSQL on Shared Storage in the Global Zone

Example: Preparing the Cluster for PostgreSQL

Example: Configuring Cluster Resources for PostgreSQL

Example: Modifying the PostgreSQL Configuration File

Example: Building and Installing the PostgreSQL Software on Shared Storage

Example: Enabling the PostgreSQL Software to Run in the Cluster

Installing the PostgreSQL Binaries in the Default Directory (Alternative Installation)

Example: Building and Installing the PostgreSQL Software in the Default Directory in the Global Zone

C.  Deployment Example: Installing PostgreSQL in a Non-Global HA Container

D.  Deployment Example: Installing PostgreSQL in a Non-Global Zone

E.  Deployment Example: Installing PostgreSQL in the Global Zone Using WAL File Shipping

Index

Example: Building and Installing the PostgreSQL Software in the Default Directory in the Global Zone

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.

  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. Expand the software tar file.
    phys-schost-1$ gzcat /tmp/postgresql-8.1.0.tar.gz |tar xvf -
  5. 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
  6. 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
  7. 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
  8. Build the PostgreSQL binaries.
    phys-schost-1$ gmake

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

  9. Run the PostgreSQL regression tests.
    phys-schost-1$ gmake check
  10. Log back in as root.
    phys-schost-1$ su
  11. 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
  12. 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
  13. Install the binaries.
    phys-schost-1# gmake install
  14. Copy the binaries to the second node.
    phys-schost-1# scp -rp /usr/local/pgsql phys-schost-2:/usr/local
  15. Exit from root access.
    phys-schost-1# exit
  16. Clean the distribution.
    phys-schost-1% gmake clean

Next Steps

Perform the steps in Example: Enabling the PostgreSQL Software to Run in the Cluster to complete installation and configuration of PostgreSQL.