Menu Close
    Hire us Request quote Reading list Switch to dark mode

    Installing Odoo on Ubuntu

    Odoo: Odoo is a web-based opensource ERP software  which allows you to manage your business with ease. Odoo offers various business management applications such as Sales management, Project management, Human Resource Management, Point of Sales and the list goes on. But before you can access such useful apps you will have to get it installed on a web server or a system. Installing Odoo on Ubuntu can be sometimes complex for a newbie. This blog will guide you in installing Odoo on Ubuntu starting from Odoo 7 to the latest release of Odoo 10 on Ubuntu 14.04 and above.

    Step 1: Getting your system ready for the installation

    Make sure your server has all the latest versions & patches. Update the repositories by following command:
    sudo apt-get update

    Step 2: Creating an Odoo user

    The next step is to create a system user which will own the application Odoo. It is not mandatory to create a new user, you can use your current system user as well. Although it is the recommended step to create a new user for Odoo. We can create a new user “odoo” and provide a home directory for it via command below.
    sudo adduser --system --home=/opt/odoo --group odoo

    Step 3: Installing and Setting up PostgreSQL

    Install PostgreSQl with:

    sudo apt-get install postgresql

    Once the PostgreSQL is installed, next we setup a new PostgreSQL user for our application. This user will be used for making all the database interaction form the Odoo.

    sudo su - postgres

    createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo

    after running this command you will be asked for a password and then a confirmation of that

    Enter password for new role: *****

    Enter it again:*****

    Then finally exist the PostgreSQL by typing the command:

    exit

    Step 4: Installing Python and other dependent libraries

    First installing the Python dependencies for Odoo:

    sudo apt-get install python-cups python-dateutil python-decorator python-docutils python-feedparser python-gdata python-geoip 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-unicodecsv python-unittest2 python-vatnumber python-vobject python-werkzeug python-xlwt python-yaml python-setuptools python-babel python-reportlab-accel python-zsi python-openssl python-egenix-mxdatetime python-unittest2 python-mock python-docutils lptools make python-psutil python-paramiko poppler-utils python-pdftools antiword

    Next is to install Less CSS via nodejs. we will start with installing npm:

    apt-get install -y npm

    In later debian (>jessie) and ubuntu (>14.04) we may need to add a symlink as npm packages call node but debian calls the binary nodejs

    sudo ln -s /usr/bin/nodejs /usr/bin/node

    sudo npm install -g less

    sudo apt-get install node-less

    Once all the packages are installed we are ready to proceed with installing Odoo server

    Step 5 : Installing Odoo server from Odoo source hosted on Github

    Make sure you have GIT installed on your system and if not then install with the simple command:

    sudo apt-get install git

    After installing the the GIT we will clone the Odoo Source in the home directory of the odoo user we created earlier.

    sudo su - odoo -s /bin/bash

    While cloning the branch from github you can specify the branch you want to clone. For instance we are cloning Odoo 10 branch from the repository

    git clone https://www.github.com/odoo/odoo --depth 1 --branch 10.0 --single-branch .

    You can use the same command to install any previous versions as well just by changing the –branch 10.0 parameter to the odoo version you wish to install.

    This may take some time depending upon your internet connectivity. Once the branch is cloned exit the odoo user by typing command

    exit

    Step 6: Installing Wkhtmltopdf

    Odoo uses wkhtmltopdf to convert the html reports into pdf format. But all the versions of wkhtmltopdf does not support odoo. Here is the process to install the supported version for a system with 64 bit architecture. First download the package for installation:

    wget http://download.gna.org/wkhtmltopdf/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb

    Once the package is downloaded install it and copy the files accordingly:

    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

    Step 7: Odoo Server configuration

    We have installed all the dependencies now and we are all set to configure the Odoo Server, For this we will first create the directory for storing logs of Odoo server and assigning proper ownership to the directory:

    sudo mkdir /var/log/odoo

    sudo chown odoo:root /var/log/odoo

    Next is to create the configuration file for odoo server. Odoo application will use these configuration to run so fill in the configuration as per your requirements. We will first create a configuration file and specify the configurations:

    sudo nano /etc/odoo-server.conf

    A sample configuration file looks like this:


    Once the configration file is create we will set the ownership rights

    sudo chown odoo: /etc/odoo-server.conf
    sudo chmod 640 /etc/odoo-server.conf

    Once the configuration is created last step is to create a boot script which we will use to start or stop the odoo server.

    sudo nano /etc/init.d/odoo-server

    A script to start or stop Odoo is already available at path “/opt/odoo/debian/init” but since we have installed the odoo at path /opt/odoo we need to make some minor changes in this script file for the parameter “DAEMON”

    Here is how the file will look like after the modification.


    Now we need to change the ownership and make this script executable

    sudo chmod 755 /etc/init.d/odoo-server
    sudo chown root: /etc/init.d/odoo-server

    We are all done now. we can start the odoo server and test if it works. To start the odoo server type in the command:

    sudo /etc/init.d/odoo-server start

    Odoo is now accessible at http://localhost:8069. Port 8069 is the default port for Odoo, it will depend upon configurations you have made.

    Cheers! You have now successfully installed the Odoo now enjoy cool business apps as per your need to make your business operation smoother…..

    . . .

    Comments (2)

    Add Your Comment

  • Brandon Ashcraft
    Everything worked except the last command. I get the error:

    Sudo: unable to execute /etc/init.d/odoo-server: no such file or directory

    I confirmed files is there…

    Did is miss something?
    Thanks.

    • Mohit Chandra
      Just saw your comment, if still you are struggling on this problem, give execute permission to this file, & then try:

      sudo chmod 755 /etc/init.d/odoo-server
      sudo chown root: /etc/init.d/odoo-server

      I hope it`ll work then 🙂

  • Back to Top
    css.php
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just received your message and our expert will get back to you shortly.
    Send Again
    Close

    Table of Content

    Hide Index