Setting up PostgreSQL 8.x and phpPgAdmin on FreeBSD 7.1

Lars Sommer,, 2009-01-18
DISCLAIMER: This is a personal note made for personal usage. It might not be easy usable nor explaining.


Install the port or package:

If PostgreSQL are supposed to run inside a jail, this must be set in the
 master host (the box outside, containing the jails):
echo "security.jail.sysvipc_allowed=1" >> /etc/sysctl.conf

Insert an entry to rc.conf:
echo 'postgresql_enable="YES"' >> /etc/rc.conf

Then PostgreSQL can be initialized and started:
/usr/local/etc/rc.d/postgresql initdb
/usr/local/etc/rc.d/postgresql start

An administrative user should be created:
su pgsql -c 'createuser -s -P lasg'

Add to /usr/local/pgsql/data/postgresql.conf
listen_addresses = 'localhost,' 

Add to /usr/local/pgsql/data/pg_hba.conf
host    all         all          trust



Install the port or package:


Add to apaches httpd.conf:

Alias /phppgadmin/      "/usr/local/www/phpPgAdmin/"
<Directory "/usr/local/www/phpPgAdmin/">
        Options none
        AllowOverride Limit
        Allow from all

Restart Apache:
/usr/local/etc/rc.d/apache22 restart

Skriv et svar

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *