phpPgAdmin-5.1安装配置
官方网站:http://phppgadmin.sourceforge.net/doku.php
参考文档:
https://raw.githubusercontent.com/phppgadmin/phppgadmin/master/INSTALL
http://www.postgresql.org/docs/9.0/static/runtime-config-file-locations.html#GUC-IDENT-FILE
http://www.postgresql.org/docs/9.0/static/auth-username-maps.html
环境:
CentOS6.5 x64
PHP 5.3.3
Apache-2.2.15
postgres (PostgreSQL) 8.4.18
phpPgAdmin-5.1
一.安装postgresql,php,httpd
[root@sentinel ~]# yum -y install postgresql-server postgresql php php-pgsql
二.配置php
[root@sentinel ~]# vim /etc/php.ini
safe_mode_allowed_env_vars = PHP_,PG
safe_mode_exec_dir = /usr/bin
三.配置postgresql
1.启postgresql服务
[root@sentinel ~]# postgres --version
postgres (PostgreSQL) 8.4.18
[root@sentinel ~]# service
Initializing database: [
[root@sentinel ~]# service postgresql start
Starting postgresql service: [
[root@sentinel ~]# chkconfig postgresql on
[root@sentinel ~]# chkconfig --list postgresql
postgresql
[root@sentinel ~]# netstat -tunlp|grep post
tcp
2.配置postgresql
a.主配置文件/var/lib/pgsql/data/postgresql.conf
[root@sentinel ~]# vim /var/lib/pgsql/data/postgresql.conf
listen_addresses = '*'
port = 5432
track_activities = on
track_counts = on
[root@sentinel ~]# service postgresql restart
Stopping postgresql service: [
Starting postgresql service: [
[root@sentinel ~]# netstat -tunlp|grep post
tcp
b.客户端认证配置文件/var/lib/pgsql/data/pg_hba.conf
http://www.postgres.cn/docs/9.4/auth-pg-hba-conf.html
[root@sentinel ~]# vim /var/lib/pgsql/data/pg_hba.conf
local
host
host
host
注意:local