The instructions you link to are out of date. They are for version 8.3 which is no longer supported. As of the time of writing this the oldest supported version is 8.4.
Although even 8.4 is still supported, if you're doing a new install it's recommended that you install a newer version. The standard Ubuntu 12.04 repositories currently have PostgreSQL version 9.1. An alternative (listed below) is to use the PGDG APT repositories. They're more up to date and allow you to also install 9.2 or 9.3 (the latest stable release as of the time of writing this).
Installing PostgreSQL on Ubuntu is really easy. The instructions below install PostgreSQL 9.3. To install a different version, just change the PG_VERSION variable name to the version you'd like to install.
Also listed below is how to install the contrib module which allows you to install a lot of the more popular extensions (like hstore) via CREATE EXTENSION ...
.
# Retrieve and install the GPG key PGDG:
PG_REPO_APT_SOURCE=/etc/apt/sources.list.d/pgdg.list
if [ ! -f "$PG_REPO_APT_SOURCE" ]
then
# Add PG apt repo:
echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > "$PG_REPO_APT_SOURCE"
# Add PGDG repo key:
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add -
fi
# Update your package lists
apt-get update
# Edit this to the version you'd like to install, e.g. 8.4, 9.0, 9.1, 9.2, or 9.3
PG_VERSION=9.3
# Install PostgreSQL
apt-get install "postgresql-${PG_VERSION}"
# (Optional) Install PostgreSQL Contrib Modules
apt-get install "postgresql-contrib-${PG_VERSION}"
Note that you don't need to do anything special like run initdb
manually after installing it this way. That will all be done for you by the installer.