I'm a MySQL user so remembering the Postgres stuff is hard
In /etc/postgresql/8.1/main/pg_hba.conf
add:
host all all 192.168.1.0/24 md5
In /etc/postgresql/8.1/main/postgresql.conf
add:
listen_addresses = '*'
Then restart postgres.
$> sudo -u postgres createuser <user> $> sudo -u postgres createdb --owner <user> <database>
$> sudo -u postgres psql ALTER USER <user> WITH PASSWORD '<password>';
Useful to make a fresh database install on another machine.
Create a backup of astj_dev_0 that we will call astj_dev_0.bak
pg_dump -U postgres astj_dev_0 >/tmp/astj_dev_0.bak
Create a new database with username and desired encoding. createdb –username=<oneusername> –encoding=latin1 <databasename>
psql --username=<username> -d <databasename> </tmp/astj_dev_0.bak