您的位置:首页 > 运维架构 > Linux

centos 下安装postgresql

2013-01-22 12:47 337 查看
安装postgresql
直接yum安装 
yum install postgresql
[code]若失败试试
rpm -i http://yum.postgresql.org/9.1/redhat/rhel-6-x86_64/pgdg-redhat91-9.1-5.noarch.rpm[/code] 
再输入 
yum install postgresql91-server postgresql91-contribservice postgresql-9.1 initdbchkconfig 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
安装过程轻松愉快
[code]
[/code]

                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: