You need to install PostgreSQL database as Odoo is using as a backend storage, you need to install and configure before you setup additional libraries and Odoo server.

openerp@openerp-desktop:/$ sudo apt-get install postgresql

Configure postgresql for Odoo user. You need to add your current user as a postgres user which you have created under Ubuntu and you are using the same user to run Odoo server. Inorder to add role to postgresql switch to postgres user.

openerp@openerp-desktop:/$ sudo su postgres
password: XXXXXXXXXX

Create a new user using following command, in my case I have created openerp as a linux user.

postgres@openerp-desktop:/$ createuser openerp
Shall the new role be a superuser? (y/n) y

If you plan to use Odoo 6.1 or above you need Python 2.6 or later version, simple like Odoo’s Versions policy its better to use the Ubuntu’s last stable or LTS version for the Production Server. On a Ubuntu or and Debian based Linux distribution you can install all required dependencies with this single command:

Odoo server can be download form the Odoo’s website, check which version you should download. If you only want to test the server, you do not need to install it. Just unpack the archive and start the openerp-server executable: