Skip to main content

Local PostgreSQL Database Setup for Rocky Linux 8.4-9.x and Red Hat 9.x

This section provides instructions to install local PostgreSQL database for primary Key Manager server running Rocky Linux 8.4 - 9.x or Red Hat 9.x.

First navigate to (replace /path/to/sshmgr7.0.0-*.x86_64 with the path to which the Key Manager installation package was extracted).

# cd /path/to/sshmgr7.0.0-*.x86_64

Install PostgreSQL on the machine. Also enable and start the PostgreSQL service.

Set up the contents of the database with following commands, where keymanager is your chosen name for the database user, and where keymanagerdb is your chosen name for the database:

# su - postgres
# createuser -S keymanager
# createdb keymanagerdb

Run these commands in psql as user postgres:

ALTER USER keymanager with encrypted password 'insert_chosen_password';
GRANT ALL PRIVILEGES ON DATABASE keymanagerdb TO keymanager;

Next you need to set up the connection between Key Manager and the database.

Configure the PostgreSQL to allow md5 connections to the database (the default is ident). Manually edit the /var/lib/pgsql/*/data/pg_hba.conf file to change it. Then restart the PostgreSQL database service to apply your changes.

You should now be able to complete the Key Manager setup by running ssh-mgr-setup.