安装postgresql
直接yum安装
yum install postgresql
若失败试试
rpm -i http://yum.postgresql.org/9.1/redhat/rhel-6-x86_64/pgdg-redhat91-9.1-5.noarch.rpm
再输入
yum install postgresql91-server postgresql91-contrib
service postgresql-9.1 initdb
chkconfig postgresql-9.1 on
验证安装成功:一种:netstat -anp
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 2447/postmaster
第二种:su postgres 登陆是否成功。
安装phppgadmin
安装包 yum install php-pgsql
下载
phppgadmin放在var/www/html目录下
重启apache service httpd restart
打开localhost/phpPgAdmin查看是否安装成功
打开数据库: psql -U postgres -h localhost
若phppgadmin登陆不上,修改 /var/lib/pgsql/9.1/data/pg_hba.conf 最底下的 host all all 127.0.0.1/32 peer 的peer为trust
安装过程轻松愉快