renaud.io

Yet Another Command Line Experiments.

Postgresql installation on debian Wheezy

Permalink

Packages installation

$ sudo apt-get update && sudo apt-get install postgresql postgresql-client postgresql-contrib postgresql-doc

The installation process takes care of the postgres user creation as of the starting of the server.

PostgreSQL configuration

We now have to set up the administrative password:

$ sudo passwd postgres

Then, we could create a new super-user:

$ su - postgres
$ create user

and define a password for that user using

$ psql -d template1 -c "alter user MyNewUser with password 'TheNewPassword'"

Remote administration

On the server side, you may configure PostgreSQL by editing the /etc/postgresql/9.1/main/pg_hba.conf. Check the pgi_hba.conf File official documentation for further information.

On the client-side, we could install pgadmin3

$ sudo apt-get install pgadmin3

Et voilà !