Install PHPPgAdmin on Debian
by
Pierre-Yves Landuré
—
last modified
Aug 08, 2013 11:26
PHPPgAdmin is a Web interface easing PostgreSQL administration. This howto ease it installation on Debian.
This howto is tested on:
- Debian 5.0 Lenny
- Debian 6.0 Squeeze
- Debian 7.0 Wheezy
Prerequisites
This howto needs:
- a Apache 2 server, with PHP support, as described by Install Apache 2 on Debian.
- a PostgreSQL server, as described by Install and setup PostgreSQL on Debian.
Warning
On Debian 7.0 Wheezy, this howto is incompatible with:
- Install PHP-FPM on Debian.
- the libapache2-mod-php5filter library.
Installation
Install the software:
command apt-get install phppgadmin
If necessary, add PHPPgAdmin configuration to LigHTTPd:
if [ -x '/etc/init.d/lighttpd' ]; then
command echo '# Alias for phpPgAdmin directory alias.url += ( "/phppgadmin" => "/usr/share/phppgadmin", ) # Disallow access to libraries $HTTP["url"] =~ "^/phppgadmin/libraries" { url.access-deny = ( "" ) } ' > /etc/lighttpd/conf-available/50-phppgadmin.conf
command lighty-enable-mod phppgadmin
/etc/init.d/lighttpd reload
fi
Allow administration account (postgres, root, ...) to use PHPPgAdmin:
command sed -i \ -e "s/\$conf\['extra_login_security'\].*/\$conf\['extra_login_security'\] = false;/" \ /etc/phppgadmin/config.inc.php
Once installed, the tool is available at the URL: http://localhost/phppgadmin/ (local installation only).
Thanks
- Thanks to PHPPgAdmin developers.