Moving PGSQL to a dedicated server

Moving PGSQL to a dedicated server


1. Install PostgreSQL version 9.2.1 on the dedicated server. After successfully installing it

2. Go to data directory of PostgreSQL installation.

3. Open pg_hba.conf - PostgreSQL Client Authentication configuration file, and go to the bottom of it.

4. By default, under IPv4 local connections, we have the following:

host all all 127.0.0.1/32 md5/trust md5/trust or someother is available as last option

      1. Change the 127.0.0.1/32 to all

5. By default, under IPv6 local connections, we have the following:

host all all ::1/128 md5/trust md5/trust or someother is available as last option

      1. Change the ::1/128 to all

6. Save the File.

7. Open Services window and restart the PostgreSQL server running in the machine to effect the changes.

8. Edit the file /opmanager/conf/database_params.conf

9. Configure the host name and the PostgreSQL port number for the url parameter as given below: 

  url jdbc:postgresql:// <name of the server where postgresql is installed> : <postgresql port> /OpManagerDB

  Example: url jdbc:postgresql://database1-server:5432/OpManagerDB

10. If you wish to enable password, un-comment the password line and set the new password.

11. Edit customer-config.xml under <opmanager_home>/conf and change StartDBServer to false (as below)

           <configuration name="StartDBServer" value="false"/>

12. Then connect the installed Postgresql from command prompt and run this query

create database "OpManagerDB";    

13. Stop that Postgres 

14. Start opmanager service


Exclude 8, 9, 10 points if you're moving to separate drive on the same server where opmanager is installed.

                    New to ADSelfService Plus?