phpPgAdmin-5.1安装配置

摘要:
https://raw.githubusercontent.com/phppgadmin/phppgadmin/master/INSTALLhttp://www.postgresql.org/docs/9.0/static/runtime-config file locations.html#GUC IDENT FILEhttp:
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  postgresql initdb
Initializing database: [  OK  ]
[root@sentinel ~]# service postgresql start
Starting postgresql service: [  OK  ]
[root@sentinel ~]# chkconfig postgresql on
[root@sentinel ~]# chkconfig --list postgresql
postgresql         0:off    1:off    2:on    3:on    4:on    5:on    6:off
[root@sentinel ~]# netstat -tunlp|grep post
tcp            0 127.0.0.1:5432              0.0.0.0:*                   LISTEN      1709/postmaster
 
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: [  OK  ]
Starting postgresql service: [  OK  ]
[root@sentinel ~]# netstat -tunlp|grep post
tcp           0 0.0.0.0:5432                0.0.0.0:*                   LISTEN      3149/postmaster
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   all         all                              md5
host    all         all         127.0.0.1/32          md5
host    all         all         ::1/128               md5
host    all         all         192.168.8.0/24        md5

注意:local   all         all                   

免责声明:内容来源于网络,仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇NOE77101固件后门漏洞分析对象拓展下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

netbeans工具使用xdebug断点调试php源码

对有有经验的程序员,使用echo、print_r()、print_f()、var_dump()等函数足以调试php代码,如果需要在IDE工具中使用断点调试,xdebug就是一个非常好的php调试工具。对于不熟悉的代码,可以用Xdebug一步一步的查看请求过程和代码执行过程。 准备工作本地部署的server环境,推荐用phpStudy(内置xdebug),开...

php的精度计算问题(bcadd和bcsub)

一、前言   我们在进行php开发的时候经常会遇到浮点型的问题,特别是涉及金额的部分,常常需要进行加减运算。当小数点的位数比较多的时候,往往容易犯一些很低级的错误。这里记录一下php的精度计算和封装的小demo。 二、关于php的高精度问题 1、概念解释 这篇文章的解释最清楚: php高精度计算问题 2、高精度数值对比大小问题 下面这篇文章讲的很好: 临时...

Yii和ThinkPHP对比心得

本人小菜鸟一只,为了自我学习和交流PHP(jquery,linux,lamp,shell,javascript,服务器)等一系列的知识,小菜鸟创建了一个群。希望光临本博客的人可以进来交流。寻求共同发展。搭建平台。 本人qq群也有许多的技术文档,希望可以为你提供一些帮助(非技术的勿加)。 QQ群: 281442983 (点击链接加入群:http://jq.q...

PHP7新特性

PHP标量类型与返回值类型声明 默认情况下,所有的PHP文件都处于弱类型校验模式。 PHP 7 增加了标量类型声明的特性,标量类型声明有两种模式:  强制模式 (默认)  严格模式 declare(strict_types=1); 代码中通过指定 strict_types的值(1或者0),1表示严格类型校验模式,作用于函数调用和返回语句;0表示弱类型校...

php中对象转换数组与数组转换对象实例

用stdClass转换数组为对象                                                                                  Php代码 $arr = array(); $arr['a'] = 1;...

PHP 使用 header 方式实现文件下载功能

header() 函数向客户端发送原始的 HTTP 报头。 下载文件要用的的请求头: header("Content-type:application/octet-stream"); header("Accept-Ranges:bytes"); header("Accept-Length:" . $file_Size); header("Content-D...