You are here: Home / Debian GNU/Linux / Web applications / Administration / Install PHPPgAdmin on Debian

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:

Warning

On Debian 7.0 Wheezy, this howto is incompatible with:

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