Overview
This document describes installing PostgreSQL 16 and preparing a standalone database for VISULOX on RHEL / Oracle Linux 9, as required by the VISULOX setup.
Result:
-
PostgreSQL Version: 16
-
Service: postgresql-16
-
Host: 127.0.0.1
-
Port: 5432
-
Application Database: visuloxdb (this is the exact database name required by VISULOX setup)
-
Application User: configurable (example:
visulox) -
Required Extension Package: postgresql16-contrib
1. Enable PostgreSQL Repository
sudo dnf module enable postgresql:16
sudo dnf clean all
sudo dnf makecache
2. Install PostgreSQL
sudo dnf install -y postgresql-server postgresql postgresql-contrib
/usr/bin/postgresql-setup --initdb
Add a configuration parameter to authenticate via password.
/var/lib/pgsql/data/pg_hba.conf
# IPv4 local connections:
#host all all 127.0.0.1/32 ident
host all all 127.0.0.1/32 scram-sha-256
#For a VISULOX Cluster installation
host all all 0.0.0.0/0 scram-sha-256
# IPv6 local connections:
#host all all ::1/128 ident
host all all ::1/128 scram-sha-256
For a VISULOX Cluster installation:
/var/lib/pgsql/data/postgresql.conf
# - Connection Settings -
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost'; use '*' for all
# (change requires restart)
3. Enable and Start PostgreSQL Service
sudo systemctl enable --now postgresql
Verify:
sudo systemctl status postgresql
4. Required Extension Package
VISULOX migrations rely on uuid-ossp, which is provided by the contrib package.
Verify that the extension files exist:
ls -l /usr/pgsql-16/share/extension/uuid-ossp.control
5. Create Application User and Database
Login as postgres:
sudo -u postgres psql
Inside psql (replace visulox and password as needed):
-- Create application user (replace `visulox` with desired username)
CREATE USER visulox WITH PASSWORD 'StrongPasswordHere';
-- Create application database owned by that user
CREATE DATABASE visuloxdb OWNER visulox;
-- Ensure privileges
GRANT ALL PRIVILEGES ON DATABASE visuloxdb TO visulox;
\q
6. Verify Application Connection
(Replace visulox with your chosen username.)
psql -h 127.0.0.1 -U visulox -p 5432 -d visuloxdb -c "select 1;"
Expected:
1
7. Clean Database Reset (If Migrations Become Dirty)
If VISULOX setup fails with:
Dirty database version XX
Reset the database (replace visulox with your chosen username):
sudo -u postgres dropdb visuloxdb
sudo -u postgres createdb -O visulox visuloxdb
Then re-run the VISULOX setup master procedure.
Final Connection Values for VISULOX
Use these in the installer (replace visulox as needed):
PostgreSQL Host: 127.0.0.1
PostgreSQL Port: 5432
PostgreSQL User: visulox
PostgreSQL Password: StrongPasswordHere
Database Name: visuloxdb