$sudo apt-get install postgresqlanswer yes to all questions.
You may also want to install pgAdmin III. It good tool to manage PostgreSQL especially if you are a beginner. In terminal type
$sudo apt-get install pgadmin3again, just answer yes to the questions.
To begin using postgre, you need to set postgre user password.
$sudo -u postgres psql postgres enter your password. psql (8.4.2) Type "help" for help. postgres=# \password postgres Enter new password: Enter it again: postgres=# CREATE DATABASE database_name; CREATE DATABASE postgres=# \quitdone. Refer to https://help.ubuntu.com/community/PostgreSQL for complete tutorial.