Jan
25
2012
1. Drop/Recreate the target database using PGAdmin
2. Be sure to add logins to all roles that are referenced in the backup script. This should only be necessary the first time. The phonesystem db references the following logins… phonesystem, phoneadmin, logsreader.
3. From a terminal window run the following command
sudo psql -d phonesystem -U seths -f “<path-to-backup>”
Seth
Nov
19
2011
- From a terminal window run “sudo gedit” and type your password when prompted. Gedit opens and you edit the conf files using it.
- Edit the file at
/etc/postgresql/8.3/main/postgresql.conf and change
listen_addresses='*'. This will enable TCPIP connections to the server.
- Edit the file at
/etc/postgresql/8.3/main/pg_hba.conf and add the following line(s)
host all all 192.168.0.0/16 trust
- This will allow tcpip connections (host) on any database (all) for any user (all) for CIDR-address 192.168.0 – any 16 high-level bits (192.168.0.0/16) and authenticates anyone that can connect to the server-no pass (trust)
See http://www.postgresql.org/docs/8.2/static/auth-pg-hba-conf.html for details
- Add any additional ip address ranges you need to that file
- From a new terminal window restart postgresql by typing the following command from a new terminal window…
sudo /etc/init.d/postgresql-8.4 restart
and type your password…if you setup the configuration correctly you should get an [OK] from the terminal.
I was also worried I would have to learn how to open up an ubuntu firewall but that was not needed.
This article helped me…
https://help.ubuntu.com/8.04/serverguide/C/postgresql.html
Seth