Postgresql in Ubuntu 6.04 Dapper Drake

This is the process I use to install and configure Apache2, Postgresql, PhpPgAdmin, and remote access for PgAdmin3 in Ubuntu Dapper.

Install apache2, postgresql, and php-postgresql packages

sudo apt-get install apache2 postgresql-8.1 php5-pgsql

Install phpPgAdmin

wget http://internap.dl.sourceforge.net/sourceforge/phppgadmin/phpPgAdmin-4.1.3.tar.gz
tar -xzf phpPgAdmin-4.1.3.tar.gz
sudo mv phpPgAdmin-4.1.3 /var/www/phpPgAdmin

Configure phpPgAdmin

sudo nano -w t /var/www/phpPgAdmin/conf/config.inc.php
change:
  $conf['servers'][0]['host'] = '';
to:
  $conf['servers'][0]['host'] = 'localhost';

Set postgres password

sudo -u postgres psql template1
alter role postgres with password 'password';
\q

Enable remote access from LAN using password

sudo nano -w /etc/postgresql/8.1/main/postgresql.conf
change:
  addresses = 'localhost'
to:
  listen_addresses = '*'
edit
  /etc/postgresql/8.1/main/pg_hba.conf
add:
  host all all 192.168.0.0/24 md5

Access postgresql via phpPgAdmin

phpPgAdmin on localhost

This entry was posted in linux, planet-ubuntu-users, tech. Bookmark the permalink.