Install PostgreSQL 13 on CentOS 8

This post will cover installing PostgreSQL 13 on CentOS 8.

We’ll be using a bash script below, which is commented so you can see the steps.

We’ll install PostgreSQL using the PostgreSQL repository, configure the pg_hba.conf file to secure the instance, and update the postgresql.conf file to allow remote connections and enable SSL.

We will also create a self-signed SSL certificate for the cluster.

As root, you can save the above script as postgresql-13-centos-8.sh or, simpler still, use wget to grab scipt from Github:

As root, make the script executable:

Run the script:

Upon completion, the postgres and SSL password will be displayed as below:

The random passwords will also be saved as auth.txt in the root directory.

Tes your installation with su – postgres and then enter the password to start psql:

Looking at the files under /var/lib/pgsql/data, our pg_hba.conf looks like below:

Our postgresql.conf has also been updated both to allow connections as well as enable SSL:

 

 

 

Webmin: Install Module via Command Line

Webmin provides a utility for installing modules via command line, install-module.pl.

On Debian systems:

On RHEL systems:

Where /path/ is the path to your module and module.wbm.gz is the module name