rhel 7 之前的版本适用
从postgres.org 下载安装包
首先安装
libs
#rpm -ivh postgresql94-libs-9.4.5-1PGDG.rhel5.x86_64.rpm
安装
客户端
#rpm -ivh postgresql94-9.4.5-1PGDG.rhel5.x86_64.rpm
安装服务器端
#rpm -ivh postgresql94-server-9.4.5-1PGDG.rhel5.x86_64.rpm
初始化数据库
#service postgresql-9.4 initdb
启动数据库
#service postgresql-9.4 start