Install Postgresql 13 on RHEL 8. Configure scram-sha-256 password authentication.

# dnf module list | grep postgres
# dnf module install postgresql:13
# which postgresql-setup
# postgresql-setup --initdb
# passwd postgres
# systemctl enable postgresql
# systemctl start postgresql
# systemctl status postgresql
#vim /var/lib/pgsql/data/postgresql.conflisten_addresses = '*'
password_encryption = scram-sha-256
# su - postgres
# psql
postgres=# \conninfo
postgres=# \password
postgres=# set password_encryption TO 'scram-sha-256';
# cd /var/lib/pgsql/data
# vim pg_hba.conf
# TYPE DATABASE USER ADDRESS METHOD# "local" is for Unix domain socket connections only
local all all scram-sha-256
# IPv4 local connections:
host all all 127.0.0.1/32 scram-sha-256
# IPv6 local connections:
host all all ::1/128 scram-sha-256
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all scram-sha-256
host replication all 127.0.0.1/32 scram-sha-256
host replication all ::1/128 scram-sha-256
# systemctl restart postgresql
$ psql -U postgres -d postgres

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store