Install Odoo 9 on Ubuntu 16.04

Posted on December 18, 20176 min read — in development

Odoo is a suite of open source business apps that offers CRM, eCommerce, billing, accounting, inventory, point of sale, project management, manufacturing, warehouse etc. For beginners, installation of Odoo may seem quite hard. This tutorial shows a step by step guide to install Odoo on your local machine. It will work both on Ubuntu 14.04 and 16.04.

Step 1:

Get information on the newest versions of packages and their dependencies.

sudo apt-get update && sudo apt-get upgrade

Step 2:

Install PostgreSQL database.

sudo apt-get install postgresql

Step 3:

Create a database user with the same name as the system username.

sudo su postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt <system_username>

Step 4:

Logout from postgres user by typing exit in the terminal. Now install the following packages. These packages are required to run Odoo.

sudo apt-get install python-psycopg2 libpq-dev python-dev libxml2-dev libxslt1-dev zlib1g-dev python-pip libjpeg8-dev python-ldap libldap2-dev libsasl2-dev nodejs npm

Step 5:

Create the following symlinks.

sudo ln -s /usr/lib/x86_64-linux-gnu/ /usr/lib
sudo ln -s /usr/bin/nodejs /usr/bin/node

Step 6:

Install less.

sudo npm install -g less

Step 7:

Install wkhtmltopdf.

sudo add-apt-repository ppa:ecometrica/servers
sudo apt-get update
sudo apt-get install wkhtmltopdf

Step 8:

Download Odoo from Git as zip file:

Step 9:

Extract the zip file. Inside the odoo-9.0 folder, there will be a requirements.txt file. Now we have to install all the required packages listed in that text file.

sudo pip install -r <odoo_directory>/requirements.txt

Step 10:

If all the required packages are installed successfully, then Odoo is almost ready to launch. To start server:

python <odoo_directory>/

Once server starts type http://localhost:8069 in the browser and it will take to the Odoo login page. Create a new Odoo database and login. Odoo dashboard will appear. To stop the server: Ctrl+C in the terminal.

Django + Gunicorn + Supervisor + Nginx