Initialize the PostgreSQL Server

If you choose to not configure the UCMDB Server with the PostgreSQL database at the time of UCMDB installation, you can initialize the PostgreSQL database and create the database service according the following instructions:

Note Initializing the PostgreSQL database and creating the database service is necessary only if you want to use the local PostgreSQL as an alternative to Oracle/MSSQL. It is not mandatory to use the local PostgreSQL; the UCMDB Server functions properly without it.

For Windows:

Note In the following instructions, replace C:\UCMDB\UCMDBServer with the appropriate path.

  1. Download and install vcredist_x64.exe from the Microsoft website.
  2. Run: C:\UCMDB\UCMDBServer\PostgreSQL\pgInitDb.bat username password port

    The username, password, and port must be chosen by the user. Verify that the port is free.

  3. Run: C:\UCMDB\UCMDBServer\PostgreSQL\pgsql\bin\pg_ctl.exe register -N UCMDB_Server_DB -D "C:\UCMDB\UCMDBServer\PostgreSQL\pgsql\data"

  4. Run: sc description UCMDB_Server_DB "UCMDB Database"

  5. Run: net start UCMDB_Local_DB

  6. Run the configuration wizard, and provide the username, password and port from above.

For Linux:

Note In the following instructions, replace /opt/UCMDB/UCMDBServer with the appropriate path.

  1. Run: find /opt/UCMDB/UCMDBServer/PostgreSQL -type f \( -name "*.sh" -or -name "*.sql" -or -name "*.conf" -or -name "*.cnf" \) -exec dos2unix {} \;
  2. Create the postgres_server group using: /usr/sbin/groupadd -f postgres_server
  3. Create the postgres_server user using: /usr/sbin/useradd -r -g postgres_server postgres_server
  4. Run: rpm -qa | grep -ic postgres

    Note If there are other versions of the Postgres RPM package installed on the system, it is recommended to remove them as they may cause conflicts.

  5. Run:

    cd /opt/UCMDB/UCMDBServer/PostgreSQL

    chmod -R 770

    chown -R postgres_server

    chgrp -R postgres_server

  6. Run: runuser -l postgres_server -c "/opt/UCMDB/UCMDBServer/PostgreSQL/pgInitDB.sh username password port"

    The username, password, and port must be chosen by the user. Verify that the port is free.

  7. Edit /opt/UCMDB/UCMDBServer/PostgreSQL/pgsql/postgresql.server and replace the string _install_dir_ with the path to the installation folder (for example, /opt/UCMDB/UCMDBServer).

  8. Run:

    cd /opt/UCMDB/UCMDBServer/PostgreSQL/pgsql

    chmod a+rx ./postgresql.server

  9. Copy /opt/UCMDB/UCMDBServer/PostgreSQL/pgsql/postgresql.server to /etc/init.d/ and rename it to postgresql_server.

  10. Run:

    chkconfig --add postgresql_server

    /sbin/service postgresql_server start

  11. Run the configuration wizard, and provide the username, password and port from above.