$ sudo yum install postgresql-server
$ sudo postgresql-setup initdb
$ sudo vi /var/lib/pgsql/data/pg_hba.conf
Find the lines that looks like this, near the bottom of the file: pg_hba.conf excerpt (original)
host all all 127.0.0.1/32 ident
host all all ::1/128 ident
Then replace "ident" with "md5", so they look like this: pg_hba.conf excerpt (updated)
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
Now start and enable PostgreSQL:
sudo systemctl start postgresql
sudo systemctl enable postgresql