Install the repository RPM:
yum install https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-redhat94-9.4-3.noarch.rpm
Install the client packages:
yum install postgresql94
- Optionally install the server packages:
yum install postgresql94-server
- Optionally initialize the database and enable automatic start:
/usr/pgsql-9.4/bin/postgresql94-setup initdb
systemctl enable postgresql-9.4
systemctl start postgresql-9.4