HP Serviceguard Linux Contributed Toolkit Suite A.04.02.01 User Guide (696979-001, June 2012)

Setting up the PostgreSQL server in SG/LX environment
Before configuring the Serviceguard package, you must complete the following configuration tasks
for the application:
1. When the PostgreSQL database is installed, the default PostgreSQL server might be configured
to start during system startup. If the server is already installed and configured, simply stop it
with the following command.
RedHat : "service postgresql stop"
2. Remove or move the following runlevel files. This disables automatic startup when the machine
boots.
Red Hat : /etc/rc.d/init.d/postgresql
Here is a simple example of configuring PostrgreSQL database instance.
1. Create directory where the database is going to be mounted.
2. Change the ownership of the directory to postgres:postgres.
For Example:
$ mkdir /pgsql1
$ chown postgres:postgres /pgsql1
3. After mounting, create the PostgreSQL database using the following command:
"/usr/bin/initdb -D<Directory>"
For Example:
$ /usr/bin/initdb -D /pgsql1
4. Edit the following parameters in the PostgreSQL database configuration file
(postgresql.conf) which is present in the database directory.
tcpip_socket = true # Allows the client connection over the network port
= 5433 # Select a unique port number for each of the
# PostgreSQL toolkit Packages
The presence of parameter tcpip_socket is dependent on the version of postgresql
supported by the distro. The newer versions of postgresql have replaced the parameter
tcpip_socket by listen_address. Depending on the parameter supported by
PostgreSQL, configure tcpip_socket=true or listen_addresses.
listen_addresses = <IP-List> # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
In listen_addresses, specify the IP addresses on which the server is to listen for connections
from client applications. The value takes the form of a comma-separated list of host names
and/or numeric IP addresses. The special entry * corresponds to all available IP interfaces.
Ensure that, the virtual IP is specified in listen_addresses ip-list.
Supported Configuration
This section explains the following supported configurations for PostgreSQL toolkit packages:
Shared configuration
Multiple instance configuration
Setting up the PostgreSQL server in SG/LX environment 29