Install Postgres in Ubuntu

By Eric Downing. Filed in Linux, OS  |  
TOP del.icio.us digg

To install PostgreSQL in ubuntu

Add the repo for postgres to the apt repo list:

 sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
 sudo wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add -

To install the postgres database packages:

 sudo apt-get update
 sudo apt-get install postgresql postgresql-contrib

Leave a Reply