Linux Database Server: Postgresql and pgAdmin

2 12 2011

I hope that you use a Debian-based distro!

sudo apt-get install postgresql

Setup the postgres‘s password:

sudo -u postgres psql
\password

digit the new password, then press Ctrl+D to exit from psql.

Edit this file (adjust your version number, I’ve used 9.1 for write this guide)

sudo vi /etc/postgresql/9.1/main/postgresql.conf

and change these lines (caution with apices, don’t cut&paste):

#listen_addresses = ‘localhost’ –> listen_addresses = ‘*’

#password_encryption = on –> password_encryption = on

finally define who can access the server:

sudo vi /etc/postgresql/9.1/main/pg_hba.conf

add to the end of file:

host all all [ip address] [subnet mask] md5

here you can specify a single host or a complete subnet, for example:

host all all 192.168.160.0/24 md5

Now we can configure pgAdmin, that is a free and open source graphical user interface administration tool for PostgreSQL, which is supported by many computer platforms.

Install your version, I continue with a GNU/Linux Debian-based:

sudo apt-get install pgadmin3

Open pgAdmin and add your server:

  • Name: [any descriptive name]
  • Host: [ip address of the server]
  • Password: [your postgres's password]

End: here we are!


Azioni

Informazione

Lascia un Commento

Fill in your details below or click an icon to log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Log Out / Modifica )

Foto Twitter

You are commenting using your Twitter account. Log Out / Modifica )

Foto di Facebook

You are commenting using your Facebook account. Log Out / Modifica )

Connecting to %s




Follow

Get every new post delivered to your Inbox.

Join 401 other followers