Entrar a root

yum -y install postgresql-server 

postgresql-setup initdb

systemctl start postgresql

systemctl enable postgresql

-------------- DESINSTALAR -------------------
Entrar a root

systemctl stop postgresql.service

yum -y remove postgresql-server postgresql

rm -rf /var/lib/pgsql/data