To install an external PostgreSQL server, ensure the PostgreSQL version matches the inbuilt PostgreSQL version series of the ServiceDesk Plus application. For example:
We recommend using Linux as the operating system for the external PostgreSQL server.
<Application Folder>/pgsql/bin/
and execute the following commands:./psql --version
psql.exe --version
sudo service postgresql start
pg_lsclusters
sudo -u postgres psql
This logs into the default PostgreSQL console on port 5432 using thepostgres
database.
Execute the following command based on your PostgreSQL version:
CREATE USER <username> WITH CREATEDB LOGIN REPLICATION
ENCRYPTED PASSWORD '<password>';
CREATE USER <username> WITH SUPERUSER CREATEDB LOGIN REPLICATION
ENCRYPTED PASSWORD '<password>';
Logout and re-login as the new user:
\q
psql -h <host> -p <port> -d postgres -U <newly created user>
List all roles and users:
\du
Create a new database:
CREATE DATABASE <new_db_name> WITH OWNER = <your_owner_name> ENCODING = 'UTF8'
LC_COLLATE = 'C' LC_CTYPE = 'C' TEMPLATE = template0;
Navigate to the new database:
\c <database_name>
List all databases:
\l
Execute the following commands:
CREATE EXTENSION IF NOT EXISTS pg_trgm;
CREATE EXTENSION IF NOT EXISTS pgcrypto;
CREATE EXTENSION IF NOT EXISTS citext;
Verify extensions:
\dx
Edit pg_hba.conf (e.g., In Linux it is placed in, /etc/postgresql/<version>/main
): Add a host row to enable connections. Example:
host all all XX.XX.XX.XX/XX md5
Avoid using0.0.0.0/0
as it allows access from all machines (not recommended).
Edit postgresql.conf:
Add the following at the end of the file:
listen_addresses = '<IP address(es)>'
Avoid using
*
to listen on all IP interfaces (not recommended).
Restart the PostgreSQL server:
sudo service postgresql restart
Navigate to <prod_home>/bin
directory and run:
changeDBServer.sh
changeDBServer.bat
Configure the database, port, username, and password.
Navigate to <prod_home>/conf/
directory and modify customer-config.xml
:
StartDBServer
to FALSE
.Start the application.