Install Postgresql13 on RHEL7

  1. Install the repository RPM
$sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
$sudo yum install -y postgresql13-server
$sudo /usr/pgsql-13/bin/postgresql-13-setup initdb
$sudo systemctl enable postgresql-13
$sudo systemctl start postgresql-13
$sudo systemctl status postgresql-13
#passwd postgres
#su - postgres
$psql
postgres=#\password postgres
postgres=#\q
#vim /var/lib/pgsql/13/data/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 0.0.0.0/0 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 peer
host replication all 127.0.0.1/32 scram-sha-256
host replication all ::1/128 scram-sha-256
#vim /var/lib/pgsql/13/data/postgresql.conf 
listen_address='*'
#systemctl restart postgresql-13
$psql -V

--

--

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