Setting up PostgreSQL 8.x and phpPgAdmin on FreeBSD 7.1

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

PostgreSQL:

Install the port or package:
databases/postgresql-8.3

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,192.168.1.52' 

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

---

phpPgAdmin:

Install the port or package:

databases/phppgadmin

Add to apaches httpd.conf:

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

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 *