centos6.7 安装phppgadmin
一. 环境说明
- 采用vmware安装centos6.7 minimal系统
- 安装依赖包
# mount /dev/cdrom /mnt \\将ISO挂载到/mnt目录下
\\安装/mnt/Packages下的包
apr-1.3.9-5.el6_2.x86_64.rpm
php-5.3.3-40.el6_6.x86_64.rpm
apr-util-1.3.9-3.el6_0.1.x86_64.rpm
php-cli-5.3.3-40.el6_6.x86_64.rpm
apr-util-ldap-1.3.9-3.el6_0.1.x86_64.rpm
php-common-5.3.3-40.el6_6.x86_64.rpm
httpd-2.2.15-45.el6.centos.x86_64.rpm
php-pdo-5.3.3-40.el6_6.x86_64.rpm
httpd-tools-2.2.15-45.el6.centos.x86_64.rpm
php-pgsql-5.3.3-40.el6_6.x86_64.rpm
libedit-2.11-4.20080712cvs.1.el6.x86_64.rpm
postgresql-libs-8.4.20-2.el6_6.x86_64.rpm
mailcap-2.1.31-2.el6.noarch.rpm
unzip-6.0-2.el6_6.x86_64.rpm
openssh-clients-5.3p1-111.el6.x86_64.rpm
二. 安装Phppgadmin
- 从phppgadmin官网下载安装包“phppgadmin-REL_5-1-0.zip”
解压缩到/var/www/html目录下 - 修改phppgadmin
# cd /var/www/html
# mv phppgadmn-REL_5-1-0 phppgadmin
# cd phppgadmin/conf
# cp config.inc.php-dist config.inc.php
# vi config.inc.php
$conf['servers'][0]['host'] = '192.168.160.236'; \\数据库IP地址
$conf['extra_login_security'] = false;
三. 配置httpd
# vi /etc/httpd/conf/httpd.conf
在文件末尾添加
<FilesMatch "\.ph(p[2-6]?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
# service httpd restart
四. 修改selinux策略
# setsebool -P httpd_can_network_connect_db 1