Install PostgreSQL on Linux

November 15, 2013

PostgreSQL is a feature rich, open source developed relational database system. As one of the most used databases in modern Web applications it provides great security features and lots of useful datatypes. Like MariaDB, another open source project, that is a fork of mysql it provides a possibility to save key value objects into the field of a relational database table. It also provides datatypes like JSON, Array or Geometric Types.

In this simple tutorial you will learn how you can setup a PostgreSQL database system on Ubuntu 12.04.

To install you only have to type

Check if PostgreSQL installed correctly

Now you have to set a password for the psql user

You are now in the PostgreSQL commandline and should see

Now you have to type the following command to set a password for the user postgresql

If you want to logout from the postgresql commandline you simply have to type \q