1、下载、安装
yum localinstall http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm
yum install -y postgresql95-server.x86_64 postgresql95-contrib.x86_64 postgresql95-libs.x86_64
2 、初始化数据库
/usr/pgsql-9.5/bin/postgresql95-setup initdb
3、配置远程连接