rpm -ivh https://yum.postgresql.org/9.6/redhat/rhel-7.3-x86_64/pgdg-centos96-9.6-3.noarch.rpm
yum update
yum install postgresql96 postgresql96-server postgresql96-libs postgresql96-contrib postgresql96-devel
/usr/pgsql-9.6/bin/postgresql96-setup initdb
systemctl enable postgresql-9.6.service
systemctl start postgresql-9.6.service
Below is another example to install PostgreSQL 9.6 on RHEL/CentOS 7:
cat << EOF > /etc/yum.repos.d/pgdg-96.repo
[pgdg96-archive]
name=PostgreSQL 9.6 RPMs for RHEL/CentOS 7
baseurl=https://yum-archive.postgresql.org/9.6/redhat/rhel-7-x86_64
enabled=1
gpgcheck=1
gpgkey=https://yum.postgresql.org/keys/RPM-GPG-KEY-PGDG
EOF
Now, you can install PostgreSQL 9.6 on RHEL/CentOS 7:
yum install postgresql96-server