cloud images

Ubuntu Intrepd - PostgreSQL Install

This tutorial will walk you through installing PostgreSQL 8.3 on an Ubuntu Intrepid server. This tutorial assumes that you have completed the steps in this setup article.

Installation

The first step we need to do is install PostgreSQL 8.3 with the aptitude package manager. This will prompt you to install 40MB in packages.

sudo aptitude install postgresql

Server Setup

PostgreSQL is managed by one user and only that user is allowed to access the server. This user is called postgres. The first thing we need to do is change the password for this user. To do this we will have to impersonate the user and login with the psql command and change their password.

# sudo -u postgres psql postgres

You should be given a SQL prompt and a screen that looks something like the following:

Welcome to psql 8.3.4, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
postgres=#