How to Install PostgreSQL on Ubuntu Gutsy Gibbon (7.10)
2008 January 21
Useful and simple guide, step by step.
http://www.supriyadisw.net/2007/02/postgresql-on-ubuntu-linux
Installing postgresql (8.2)
sudo apt-get install postgresql-8.2
Setting up the password for postgres’ postgres user
sudo -u postgres psql template1 ALTER USER postgres WITH PASSWORD 'your-password'; \q
Configure postgres’ authentication method :
sudo cp /etc/postgresql/8.2/main/pg_hba.conf /etc/postgresql/8.2/main/pg_hba.conf_bak sudo nano /etc/postgresql/8.2/main/pg_hba.conf
Add the following at the bottom of the file
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD host all all 127.0.0.1 255.255.255.0 password
Restart postgres:
sudo /etc/init.d/postgresql-8.2 restart
Quite goood article. Simple short straight to the point and most of all it actually works :-). Now it would be nice if you also mention about adding the current user as a power DB user so it wil just be good :-)
something like
sudo -i
su postgres
createuser
very very good
awesome, works for 8.3 too if you replace 8.2 with the appropriate number :)