1. go tohttps://www.postgresql.org/download/linux/redhat/
2. select version to be installed.
3.Install the repository RPM
4.Install the client packages
5.Optionally install the server packages
6.Optionally initialize the database and enable automatic start
7.service postgresql-version initdb
8.
chkconfig postgresql-version on
9.change password
10. configure postgresql
11. open port 5432
原文链接:https://www.f2er.com/postgresql/193823.html