The following installation procedure is based on the official PostgreSQL Yum Repository instructions for Red Hat family distributions.
AlmaLinux and CentOS do not include PostgreSQL 17 in their default repositories. The official PostgreSQL Yum Repository must be added.
For AlmaLinux/CentOS/Rocky Linux 9:
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
For AlmaLinux/CentOS/Rocky Linux 8:
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
For RHEL 10:
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-10-x86_64/pgdg-redhat-repo-latest.noarch.rpm
This repository is maintained by the PostgreSQL Global Development Group (PGDG) and provides packages for all supported versions of PostgreSQL.
Red Hat family distributions include older PostgreSQL versions in their AppStream modules. To ensure PostgreSQL 17 is installed from the official repository, disable the built-in module:
sudo dnf -qy module disable postgresql
Verify Available Modules (Optional):
dnf module list postgresql
This should show that the PostgreSQL modules are disabled.
Install the PostgreSQL 17 server and client packages:
sudo dnf install -y postgresql17-server postgresql17-contrib
Package Details:
For a complete list of available packages, refer to the PostgreSQL Yum Repository documentation.
Before starting PostgreSQL for the first time, initialize the database:
sudo /usr/pgsql-17/bin/postgresql-17-setup initdb
This command:
/var/lib/pgsql/17/data/)postgresql.confAfter initialization, create the SECollab database and user accounts:
1. Start PostgreSQL temporarily (if not already started):
sudo systemctl start postgresql-17
2. Access PostgreSQL as the postgres user:
sudo -u postgres psql
3. Run the following SQL commands:
CREATE ROLE architect;
CREATE DATABASE secollab WITH OWNER architect;
CREATE USER secollab WITH PASSWORD 'secollabUserPassword';
GRANT architect TO secollab;
Important: Replace 'secollabUserPassword' with a strong, secure password for the SECollab user.
4. Verify the database was created:
\l
You should see the secollab database listed with architect as the owner.
5. Exit psql:
\q
Enable PostgreSQL to Start on Boot:
sudo systemctl enable postgresql-17
Start the PostgreSQL Service (if not already started):
sudo systemctl start postgresql-17
Check Service Status:
sudo systemctl status postgresql-17
You should see output indicating that the service is "active (running)".
Check PostgreSQL Version:
psql --version
Expected output: psql (PostgreSQL) 17.X
Verify SECollab Database:
sudo -u postgres psql -d secollab -c "SELECT current_database();"
Expected output: secollab
Verify SECollab User:
sudo -u postgres psql -c "\du secollab"
This should display the secollab user with membership in the architect role.
The offline installation procedure allows you to install PostgreSQL on a server that is not directly connected to the internet.
It follows the standard procedure with two exceptions:
sudo dnf localinstall *.rpm