NOTE: Before proceeding - Please take a snapshot of your server.
NOTE: These steps show how to install PostgreSQL 16
Backup Existing VT Docs Database:
cd /opt/visiblethread/VisibleThreadTools sudo ./vt-backup.sh
This creates a backup in
Stop Services:
/opt/visiblethread/VisibleThreadTools/vtbackups.Stop Services:
sudo systemctl stop visiblethread-docs sudo systemctl stop postgresql
Uninstall Old PostgreSQL:
sudo yum remove postgresql* sudo dnf module reset postgresql sudo mv /var/lib/pgsql /tmp/pgsql.bak
Enable and install PostgreSQL 16 from RHEL repositories:
sudo dnf module disable postgresql sudo dnf module enable postgresql:16 sudo dnf install -y postgresql-server postgresql-contrib
Initialize the DB:
sudo su - postgres -c "/usr/bin/postgresql-setup --initdb"
Enable and start PostgreSQL service:
sudo systemctl enable --now postgresql
Verify service is active:
systemctl status postgresql
Edit pg_hba.conf:
sudo nano /var/lib/pgsql/data/pg_hba.conf
Add these lines at the very top of pg_hba.conf, then save the file:
host all visiblethread 127.0.0.1/32 md5 host all visiblethread localhost md5
Login into psql:
cd
sudo -u postgres psqlConfigure DB:
create database visiblethread; create role visiblethread with password 'your-db-password'; alter role visiblethread with LOGIN CREATEDB; alter database visiblethread owner to visiblethread;
NOTE: 'your-db-password' must match the password in
/etc/default/visiblethread.env !!Restart PostgreSQL:
sudo systemctl restart postgresql
Restore your Backup:
cd /opt/visiblethread/VisibleThreadTools sudo ./restore.sh /opt/visiblethread/VisibleThreadTools/vtbackups/<your.dump file>