Install PostgreSQL 12 on CentOS 8

This post will cover installing PostgreSQL 12 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, save the above script as and make it 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: Change Login Message

In a previous post, we saw how to use a custom logo for the Webmin login page.

In this post, we’ll see how to change the login message displayed.

By default, the message displayed is:

You must enter a username and password to login to the Webmin server on ServerName

This message, as all others, is contained in the en language file.

When using the default Authentic Theme, the file is located at:

For Ubuntu

For CentOS

The line to update is line 150, login_message, as shown below:

When using other themes, the file is located at:

For Ubuntu

For CentOS

The line to update is line 135, session_mesg, as shown below: