PostgreSQL12 Install
Linux downloads (Red Hat family)
https://www.postgresql.org/download/linux/redhat/
1.
dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm2.
2.
dnf -qy module disable postgresql
3.
dnf install -y postgresql12-server
4.
/usr/pgsql-12/bin/postgresql-12-setup initdb5.
5.
systemctl enable postgresql-126.
systemctl start postgresql-12
6. \l
# Install the repository RPM:
dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
# Disable the built-in PostgreSQL module:
dnf -qy module disable postgresql
# Install PostgreSQL:
dnf -y install postgresql12-server
# Optionally initialize the database and enable automatic start:
/usr/pgsql-12/bin/postgresql-12-setup initdb
systemctl enable postgresql-12
systemctl start postgresql-12
su postgres
psql
\l
alter role postgres with password 'dbPasswd123';
create database testdb1;
\q
firewall-cmd --add-port=5432/tcp --zone=public --permanent
firewall-cmd --reload
systemctl restart postgresql-12