When using TDM, you need to have a PostgreSQL database; this document describes how to install it.
TDM 7.xx is certified to be used with PGSQL 9.6 & 13.
Important file locations are:
/opt/apps/pgsql
Add the following users:
mkdir -p /opt/apps
chmod 755 /opt/apps
useradd -m -d /opt/apps/pgsql pgsql
#### add the following packges for RHEL/CentOs 8
dnf install -y compat-openssl10 readline* glibc-locale-source glibc-langpack-en
ln -s /usr/lib64/libreadline.so /usr/lib64/libreadline.so.6
Connect as the pgsql user on the server console
Download or copy the tarball file from this link: pg13.3_tls_enabled.tar.gz.
Download the cert file from this link: pg13.3_tls_cert.zip
Copy the files to the Fabric instance that runs TDM, and place them here: $K2_HOME/.pg_cert/ (you will need to create this directory)
Untar the pg13.3_tls_enabled.tar.gz
as follows:
tar -zxvf pg13.3_tls_enabled.tar.gz && bash -l
cd bin/
./pg_ctl -D /opt/apps/pgsql/data -l logfile start
./bin/pg_ctl -D /opt/apps/pgsql/data -l logfile stop
createuser tdm --login --superuser
createdb -O tdm TDMDB
echo "ALTER USER tdm WITH PASSWORD 'tdm';"| psql
echo "ALTER USER postgres WITH PASSWORD 'postgres';"| psql
echo "ALTER USER postgres WITH SUPERUSER;"| psql
Connect via a pgadmin, then log in as the tdm user and run the contents of TDMGUI/createTDMDB/k2vtdm2.sql
and TDMGUI/createTDMDB/k2vtdm3.sql
Alternatively, you can copy the files to the pgsql console and run them with the psql command. The files are located under ~/ k2vtdm2.sql ~/ k2vtdm3.sql
Example:
cd ~/
psql -d TDMDB -a -f ~/k2vtdm2.sql
psql -d TDMDB -a -f ~/k2vtdm3.sql
Connect via a pgadmin and set this up as shown in the below example:
echo "SELECT datname,usename, ssl, client_addr FROM pg_stat_ssl JOIN pg_stat_activity ON pg_stat_ssl.pid = pg_stat_activity.pid;" | psql
datname | usename | ssl | client_addr
----------+----------+-----+---------------
postgres | postgres | t | 10.212.134.59
postgres | postgres | t | 10.212.134.59
postgres | postgres | t | 10.212.134.59
postgres | postgres | t | 10.212.134.59
pgsql | pgsql | f |
(5 rows)
SELECT datname,usename, ssl, client_addr
FROM pg_stat_ssl
JOIN pg_stat_activity
ON pg_stat_ssl.pid = pg_stat_activity.pid;
Edit the TDM Interface
Set the Custom Connection String setting to true and add &ssl=true to the connection string.
Example:
Verify that the TDM interface is defined using the Generic DB format (Database Type is genericdb).
Redeploy the project to Fabric.
Edit the Environments
When using TDM, you need to have a PostgreSQL database; this document describes how to install it.
TDM 7.xx is certified to be used with PGSQL 9.6 & 13.
Important file locations are:
/opt/apps/pgsql
Add the following users:
mkdir -p /opt/apps
chmod 755 /opt/apps
useradd -m -d /opt/apps/pgsql pgsql
#### add the following packges for RHEL/CentOs 8
dnf install -y compat-openssl10 readline* glibc-locale-source glibc-langpack-en
ln -s /usr/lib64/libreadline.so /usr/lib64/libreadline.so.6
Connect as the pgsql user on the server console
Download or copy the tarball file from this link: pg13.3_tls_enabled.tar.gz.
Download the cert file from this link: pg13.3_tls_cert.zip
Copy the files to the Fabric instance that runs TDM, and place them here: $K2_HOME/.pg_cert/ (you will need to create this directory)
Untar the pg13.3_tls_enabled.tar.gz
as follows:
tar -zxvf pg13.3_tls_enabled.tar.gz && bash -l
cd bin/
./pg_ctl -D /opt/apps/pgsql/data -l logfile start
./bin/pg_ctl -D /opt/apps/pgsql/data -l logfile stop
createuser tdm --login --superuser
createdb -O tdm TDMDB
echo "ALTER USER tdm WITH PASSWORD 'tdm';"| psql
echo "ALTER USER postgres WITH PASSWORD 'postgres';"| psql
echo "ALTER USER postgres WITH SUPERUSER;"| psql
Connect via a pgadmin, then log in as the tdm user and run the contents of TDMGUI/createTDMDB/k2vtdm2.sql
and TDMGUI/createTDMDB/k2vtdm3.sql
Alternatively, you can copy the files to the pgsql console and run them with the psql command. The files are located under ~/ k2vtdm2.sql ~/ k2vtdm3.sql
Example:
cd ~/
psql -d TDMDB -a -f ~/k2vtdm2.sql
psql -d TDMDB -a -f ~/k2vtdm3.sql
Connect via a pgadmin and set this up as shown in the below example:
echo "SELECT datname,usename, ssl, client_addr FROM pg_stat_ssl JOIN pg_stat_activity ON pg_stat_ssl.pid = pg_stat_activity.pid;" | psql
datname | usename | ssl | client_addr
----------+----------+-----+---------------
postgres | postgres | t | 10.212.134.59
postgres | postgres | t | 10.212.134.59
postgres | postgres | t | 10.212.134.59
postgres | postgres | t | 10.212.134.59
pgsql | pgsql | f |
(5 rows)
SELECT datname,usename, ssl, client_addr
FROM pg_stat_ssl
JOIN pg_stat_activity
ON pg_stat_ssl.pid = pg_stat_activity.pid;
Edit the TDM Interface
Set the Custom Connection String setting to true and add &ssl=true to the connection string.
Example:
Verify that the TDM interface is defined using the Generic DB format (Database Type is genericdb).
Redeploy the project to Fabric.
Edit the Environments