How to Install OpenERP in Linux

Here is a post on how to install OpenERP in Vritualenv or multiple versions of OpenERP in Linux



To Install PostgreSQL in Ubuntu use the below command

sudo apt-get install postgresql

After installing PostgreSQL, configure it. The default super user in PostgreSQL is “postgres”. Using “postgres” user, create a new super user for OpenERP to connect to PostgrSQL.

Login as “postgres” and  use the below command in terminal. Type the password for the user when prompted.

sudo su - postgres

After loging in as “postgres”, add new user to PostgreSQL using the below command

createuser --createdb --username postgres --no-createrole --pwprompt user

*Note: In the above command, change “user” to your system’s user name.

After executing the above command it will prompt for the password of the new role. Enter the password for the new role and choose “yes” when it prompts again asking to confirm the new user to be the super user.

Then exit from Postgres user


To install Virtualenv check the previous post “How To Install Virtualenv in Linux”


For OpenERP5 the following are required to be installed

  • python-psycopg2
  • python-reportlab
  • python-dateutil
  • python-pytz
  • python-pychart
  • python-dot
  • python-lxml
  • python-vobject
  • python-setuptools

In the above dependencies, first install the python-setuptools. In order to install setuptools, use the below command or copy and paste it in terminal and enter the password for the user when prompted.

sudo apt-get install python-setuptools

After installing python-setuptools, the other dependencies can be easily installed using Easy Install or copy and paste the below command to install all in a single line.

sudo easy_install psycopg2 reportlab pydot pytz pychart lxml vobject python-dateutil PyYaml

To install OpenERP in Virtualenv

Create a Virtualenv folder called openerpv_5 to the directory where you want to install OpenERP. The below command is used to create a Virtualenv folder

virtualenv openerpv_5

Now change the directory to openerpv_5 and then activate the virtualenv openerpv_5 by using the below command

source bin/activate

After activating the Virtualenv, download the OpenERP server and client from to the Virtualenv folder i.e,openerpv_5. Now extract the tar files in the same folder. This can be done by right clicking on the tar file and choosing “extract here” or use the below command

for OpenERP Server

tar -xvf openerp-server-5.0.16.tar.gz

for OpenERP Client

tar -xvf openerp-client-5.0.16.tar.gz

After extracting, install the server first. To install the server, go to the directory “openerp-server-5.0.16″ and use the below command.

python install

The openerp-server will be installed in Virtualenv. The server can be started by using the below command. Move to the directory bin i.e., openerp-server-5.0.16./bin/


Now, open a new terminal to install the openerp-client. Move to the directory where the Virtualenv is and then activate the Virtualenv. After activating the Virtualenv, move to the opener-client-5.0.16 directory. Now, install the client as we installed server. Use the same command.

python install

After Installing the client, run the client as we started server. Move to the directory bin i.e., opener-client-5.0.16/bin then run the below command


To Install another version just create another Virtualenv like openerp6 or something then repeat the steps above to install it. If you have any queries, feel free to write to me.

  • pierre

    I tried your tutorial and it works in a localhost. But I would like to create a virtual environment with openerp on my server and be connected with another computer. How can I do this ?

    • Hi Pierre,

      Same procedure, It should work…

  • felix

    Hi Manivannan,

    what kind of modifications I have to do on init.d scripts to get this virtualenv run from start?

    Thanks a lot for this tutorial!


  • felix

    Hi Manivannan,

    tried to install openerp-6.1-dev nightly build – but there are a lot of missing dependencies. Even they are fulfilled on the main system – any suggestions?

    Thanks a lot!