How to use my own PostgreSQL instead of the PostgreSQL bundled with Applications Manager ?

How to use my own PostgreSQL instead of the PostgreSQL bundled with Applications Manager ?

Applications Manager v17 comes bundled with PostgreSQL 15 and Applications Manager v16 comes bundled with PostgreSQL 11. If you want to use your own PostgreSQL instead, follow the steps mentioned below :

Prerequisites:
  1. A compatible PostgreSQL database (version 15.x or 11.x based on Applications Manager version) should be accessible from Applications Manager installation.
  2. A PostgreSQL User with privileges to Login, Create Database, and have full control over tables in that database.
  3. A Backup Applications Manager's backend database (AMDB) must be restored to the new PostgreSQL database if migration is required.
Steps:
  1. Shut down Applications Manager.
  2. Edit <AppManager_Home>\conf\AMServer.properties file using a text editor (like wordpad or vi or sublime) and make the following changes :
    • Change line 
      am.dbport.check=true
      to 
      am.dbport.check=false

    • Change 
      am.db.port=15432
      to 
      am.db.port=<port of your PostgreSQL>      (ex:  am.db.port=5432)

  3. Edit <AppManager_Home>\working\conf\database_params.conf file using a text editor and make the following changes :
    • Specify the host and port of your own PostgreSQL. Change line 
      url jdbc:postgresql://localhost:15432/amdb?dontTrackOpenResources=true&useUnicode=true&characterEncoding=UTF-8 AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB
      to
      url jdbc:postgresql://<PostgreSQL Host>:<PostgreSQL Port>/amdb?dontTrackOpenResources=true&useUnicode=true&characterEncoding=UTF-8 AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB

      Example:
      jdbc:postgresql://192.168.233.171:5432/amdb?dontTrackOpenResources=true&useUnicode=true&characterEncoding=UTF-8

    • Specify the username of your own PostgreSQL. Change line 
      username postgres AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB
      to 
      username <PostgreSQL Username> AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB

      Example:
      username apm AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB

    • Specify the password of your own PostgreSQL. Change line 
      encryptedpassword eK6q1CJ9697s7O AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB
      to
      password <PostgreSQL password> AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB

      Example:
      password appmanager AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB

  4. Take a backup of <AppManager_Home>\working\bin\startPGSQL.bat/.sh file and <AppManager_Home>\working\bin\stopPGSQL.bat/.sh file.
  5. Delete files under <AppManager_Home>\logs directory.
  6. Make sure that pg_hba.conf file under data directory of PostgresSQL server has the host of the Applications Manager server listed.
  7. Check if the IP address of the Applications Manager server is included in "listen_addresses" in postgresql.conf file under data directory of PostgresSQL server.  
  8. Start Applications Manager.

                  New to ADSelfService Plus?