Setup PostgreSQL database system

PostgreSQL is a powerful, open source object-relational database system. It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness.

1. Install packages

apt-get install postgresql postgresql-client


2. Create a user

// Change to the postgres linux user and create the actual user
su postgres
createuser user1

// Using the default template allow the user and set password
psql template1
alter user aip password ‘password’

That’s actually all you need to install and create the firt user. Follow the remaining steps to allow remote access to the PostgreSQL server.

3. Enable TCP/IP connections to the server to be able to manage by a remote client. Edit this line in the main PostgreSQL config file (pico /etc/postgresql/7.4/main/postgresql.conf):

tcpip_socket = true

If managing on Windows I recommend using the EMS SQL Manager

4. Allow connections from you IP address or a range (pico /etc/postgresql/7.4/main/pg_hba.conf)

host    all         all   trust

Using this code I enabled the IP range to connect to the server. Make sure you allow as few IP addresses as possible.

You’re all set. Make sure the port 5432 is open in all firewalls to be able to remote manage the server.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Installing Postfix with MySql backend and TLS

In this tutorial we’ll install a ready to use Postfix mail server with MySql backend for virtual...

Installing ionCube

ionCube protects software written using the PHP programming language from being viewed,...

Installing PowerDNS on etch/lenny

The PowerDNS Nameserver is a modern, advanced and high performance authoritative-only nameserver....

Installing Zenoss monitoring system

Zenoss is an award-winning open source IT monitoring product that effectively manages the...

Upgrade from etch to lenny

Debian has released a stable version of Debian 5.0 (lenny). If you’re running previous version of...