Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- edit repository:
- sudo nano /etc/apt/sources.list
- add repo below:
- deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main
- download key:
- wget http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc
- install repo key:
- sudo apt-key add ACCC4CF8.asc
- update repo database:
- sudo apt-get update
- install postgresql:
- sudo apt-get install postgresql libpq-dev
- to check if installation successful:
- locate postgresql
- to check installed version:
- psql -V
- change postgresql user password:
- change to ubuntu postgres user:
- sudo su - postgres
- go to postgres commandline:
- psql -d postgres -U postgres
- while on postgres commandline, change postgres user password with your own password:
- alter user postgres with password 'your_password_here';
- exit postgres commandline:
- \q
- exit postgres user:
- exit
- to access postgres from remote:
- Make changes to pg_hba.conf (authetification methods):
- sudo nano /etc/postgresql/9.1/main/pg_hba.conf
- change md5 to trust, change network address/subnet mask:
- host all all 192.168.254.0/24 trust
- edit postgresql.conf:
- sudo nano /etc/postgresql/9.1/main/postgresql.conf
- change #listen_addresses = 'localhost' to listen_addresses = '*':
- listen_addresses = '*'
- restart postgresql:
- sudo /etc/init.d/postgresql restart
- install postgres administration tool:
- sudo apt-get install pgadmin3
Advertisement
Add Comment
Please, Sign In to add comment