RHEL5.5默认的源里没有postgresql9的包,需要下载源。下载地址 :http://yum.postgresql.org/9.2/redhat/rhel-5-x86_64/pgdg-redhat92-9.2-7.noarch.rpm
然后安装源
rpm -ivh pgdg-redhat92-9.2-7.noarch.rpm
最后安装postgresql92
yum install postgresql92 postgresql92-server postgresql92-devel
初始化数据库
service postgresql-9.2 initdb Initializing database: [ OK ]
启动数据库
/etc/init.d/postgresql-9.2 start Starting postgresql-9.2 service: [ OK ]
查看数据状态
netstat -nutlap | grep post tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 21627/postmaster udp 0 0 127.0.0.1:12823 127.0.0.1:12823 ESTABLISHED 21627/postmaster