Odoo Installation !

Naresh Soni, Naresh Soni

Do you want to  use Odoo on your own premise ?

If yes then this blog is meant for you.

Let's see how we can install Odoo 8.0 on our own premise.

There are mainly 3 components of Odoo.

Odoo Server

Odoo Client

Postgres Database

Odoo has two clients GTK(Thick Client Desktop) and Web Client. As of now the GTK is no more used not maintained. All latest Odoo applications is recommended to access via web client. As of latest Odoo version the web client is now embedded in the main Odoo Server and it does not require to deploy separately. 

Now , let's see the installation procedure for lunux distribution, we will first need to install PostgresSQL, the database engine used by odoo, then we will install odoo itself.

Installation Steps

We will use the following command on command prompt for installation

Installation of Postgresql

  sudo apt-get install postgresql
 For example:
 odoo@cozybizs:/$ sudo apt-get install postgresql

Then next we will also install the a graphical user interface of postgresql,for this we will use the following command:
                                                                         sudo apt-get install pgadmin3
 For example:
 
odoo@cozybizs:/$ sudo apt-get install pgadmin3

after we finished the instaltion we will need to create a postgreSQL user, This user needs to be same as our system user because odoo will use this user to connect to the database. If we do not create this user then  we want be able to create a database from the Odoo Client.

There are two methods to create this user:

Method 1: 

We may first need to login as default superuser of postgreSQL called as postgres.

         odoo@cozybizs:/$ sudo su postgres

Now we create a PostgreSQL user odoo by following command:


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

we will need to make this new user a superuser, as this user is the owner of all the tables 
created by Odoo Client.Next, connect to the default table template1
using the command as:
postgres@cozybizs:/$ psql template1

now we need assign  access rights to the role odoo for the database which will be created 
from Odoo Client, for this use the command as under

template1=# alter role odoo with password 'postgres';

Method 2:
 
postgres@cozybizs:/$ createuser --createdb --username postgres –no-createrole --pwprompt odoo
Enter password for new role: ********
Enter it again: *********
Shall the new role be a superuser? (y/n) y
CREATE ROLE

Installation of Odoo Server
 
First we will need to get all packages installed. Use the following command to install all required packages in one shot.
 
sudo apt-get install python-dateutil
python-decorator python-docutils python-feedparser \
python-gdata python-gevent python-imaging
python-jinja2 python-ldap python-libxslt1 python-lxml python-mako
python-mock python-openid python-passlib python-psutil
python-psycopg2 python-pybabel python-pychart python-pydot
python-pyparsing python-pypdf python-reportlab python-requests
python-simplejson python-tz python-unittest2 python-vatnumber
python-vobject python-werkzeug python-xlwt python-yaml wkhtmltopdf

Note: The wkhtmltopdf has version issue with Ubuntu 14.04. To fix this follow the below steps:
sudo wget http://jaist.dl.sourceforge.net/project/wkhtmltopdf/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb
sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
sudo cp /usr/local/bin/wkhtmltoimage /usr/bin

Update:If still you face erros while printing Qweb reports then just go to menu 
Settings/Technical/ System Parameters just create a new entry with:
Key:webkit_path
Value:/usr/bin/wkhtmltopdf ( This is the path of the binary installed on your system)

Next install Git to fetch Odoo latest source code.
sudo apt-get install git git clone https://www.github.com/odoo/odoo --depth 1 --branch 8.0 –single-branch
 
now we have the latest source of Odoo.  Open the terminal and just go to the path where source is installed. 
For example cd /home/cozybizs/odoo/8.0 and you will have this.
odoo@cozybizs:~/workspace/odoo/8.0$

 
now start odoo server as under:
odoo@cozybizs:~/workspace/odoo/8.0$ ./openerp-server --addons-path=addons
Alternatively you can also specify the parameters on command line or edit the configuration file usually
saved with name and path as $HOME/.openerp_serverrc.You can also You can start the OpenERP 
server with the -s option to create a configuration file with default options.
You can download different packages like .exe,rpm, deb  from https://nightly.odoo.com/

Share