In this article, we will see how to install PostgreSQL 11 on Redhat Linux Operating System.
Steps to Install PostgreSQL 11 on Redhat:
Step1: Configure PostgreSQL yum repository:
rpm -Uvh https://yum.postgresql.org/11/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Step2: Install PostgreSQL 11 Server.
yum install postgresql11-server
Step3: Initialize PGDATA
/usr/pgsql-11/bin/postgresql-11-setup initdb
Step4: Start PostgreSQL Server.
systemctl start systemctl start postgresql-11.service
Step5: Verify Installation by connecting to PostgreSQL Server.
sudo su postgres psql
Then, run the below commands
\conninfo SELECT VERSION();
Same explained in the below video.