OpenERP, Tutorials

A No-nonsense OpenERP Installation Guide

This is a no-nonsense guide to the installation of OpenERP — the popular open source and customizable ERP solution — aimed at the complete newbie. Of course, there has to just a little bit of “nonsense” to get you started. So, here it is: (a) You need to have PostgreSQL installed as the database backend for OpenERP. (b) OpenERP is written in python so you’ll need some packages for that part. (c) There is a server and a client. The server is important — client can be both a desktop client or a web client. (d) We’ll cover all of this except the web client. You don’t need that to get started. (e) We’re using OpenERP on Ubuntu 11.10 but an older version should also work.

Setting up PostgreSQL
This is fairly straight-forward. You need to issue the following commands. (If you’re new to Linux, the (parts of) lines starting with # are comments.)

sudo apt-get install postgresql pgadmin3 
sudo su postgres  # login as postgres user

createuser openerp
# Answer y to the following question: 
# Shall the new role be a superuser? (y/n) y

psql template1
alter role openerp with password 'postgres';
# Enter Ctrl+D to exit

# create database for openerp with owner openerp 
createdb -O openerp openerp 
exit  # to go back to the normal user

Setting up OpenERP Server

First, we need to download the sources:

cd ~ 
mkdir temp 

Then, we install all the required dependencies:

sudo apt-get -y install python-lxml 
   python-mako python-dateutil python-psycopg2 
   python-pychart python-pydot python-tz 
   python-reportlab  python-yaml python-vobject python-setuptools

Extract and install the server:

cd ~/tmp 
tar zxf openerp-server-6.0.3.tar.gz 
cd openerp-server-6.0.3
sudo python install 

Create an OS user for openerp to run as:

sudo useradd openerp 
sudo passwd openerp 
# give it password 'postgres' for simplicity

And finally, start the server:

sudo su openerp # we should run openerp as its own user  

Using the Client

Leave that terminal running and open up another one. First, we’ll install the dependencies for the client:

sudo apt-get -y install python-gtk2 
   python-glade2 python-matplotlib python-egenix-mxdatetime 
   python-dateutil python-pydot python-tz python-hippocanvas

The package python-xml (suggested by the official documentation) is deprecated and is no longer available. You don’t need it anyway since you can use the xml support in core python.

cd ~/tmp 
tar zxf openerp-client-6.0.3.tar.gz
cd openerp-client-6.0.3

To test out that the server is working properly:

cd bin 

You should now see the login screen similar to this one:

OpenERP Client

Login using the following credentials:

username: admin 
password: admin 

Installation of the client is giving me trouble right now. I’ll post the installation instructions after I sort them out inshaallah.