loader
  • Welcome to Odoo Professional Consulting Agency

Testing

How To Install Odoo 14 On Ubuntu 18.04 ?

How To Install Odoo 14 On Ubuntu 18.04 ?

Steps To Install Odoo 14 In Ubuntu 18.04

There are many ways to install Odoo depending on the requirements and the easy and quick way to install Odoo by using APT repositories. 


If you want to work with running multiple Odoo versions on the same system then you can either use docker compose or docker Install Odoo in a virtual environment. 


This blog is to provide steps for installation and configuration of Odoo for production environment using Git source and Python environment on an Ubuntu 18.04 system. 


To install Odoo 14 on Ubuntu 18.04 you just follow the below steps.

Step 1 : Update Server

                        
sudo add-apt-repository universe
                    

sudo add-apt-repository universe

                        
sudo apt-get update 
                    

sudo apt-get update

                        
sudo apt-get upgrade -y 

sudo apt-get upgrade -y

Step 2 : Create Odoo User in Ubuntu

                        
sudo adduser -system -home=/opt/odoo -group odoo 

sudo adduser -system -home=/opt/odoo -group odoo

Step 3 : Install PostgreSQL Server

                        
sudo apt-get install postgresql -y 
                    

sudo apt-get install postgresql -y

Step 4 : Create Odoo user for PostgreSQL

                        
sudo su - postgres -c "createuser -s odoo" 2> /dev/null || true 
                    

sudo su - postgres -c "createuser -s odoo" 2> /dev/null || true

Step 5 : Install Python Dependencies

                        
sudo apt-get install git python3 python3-pip build-essential wget python3-dev python3-venv python3-wheel libxslt-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less libjpeg-dev gdebi -y
                    

sudo apt-get install git python3 python3-pip build-essential wget python3-dev python3-venv python3-wheel libxslt-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less libjpeg-dev gdebi -y

Step 6 : Install Python PIP Dependencies

                        
sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/master/requirements.txt 
                    

sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/master/requirements.txt

Step 7 : Install other required packages

                        
sudo apt-get install nodejs npm -y 
                    

sudo apt-get install nodejs npm -y

                        
sudo npm install -g rtlcss 

sudo npm install -g rtlcss

Step 8 : Install Wkhtmltopdf

                        
sudo apt-get install xfonts-75dpi
                    

sudo apt-get install xfonts-75dpi

                        
sudo wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb
                    

sudo wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb

                        
sudo dpkg -i wkhtmltox_0.12.6-1.bionic_amd64.deb
                    

sudo dpkg -i wkhtmltox_0.12.6-1.bionic_amd64.deb

                        
sudo cp /usr/local/bin/wkhtmltoimage /usr/bin/wkhtmltoimage
                    

sudo cp /usr/local/bin/wkhtmltoimage /usr/bin/wkhtmltoimage

                        
sudo cp /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
                    

sudo cp /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf

Step 9 : Create Log directory

                        
sudo mkdir /var/log/odoo
                    

sudo mkdir /var/log/odoo

                        
sudo chown odoo:odoo /var/log/odoo
                    

sudo chown odoo:odoo /var/log/odoo

Step 10 :Install Odoo

                        
sudo git clone --depth 1 --branch 14.0 https://www.github.com/odoo/odoo /odoo/odoo-server
                    

sudo git clone --depth 1 --branch 14.0 https://www.github.com/odoo/odoo /odoo/odoo-server

Step 11 : Setting permissions on home folder

                        
sudo chown -R odoo:odoo /odoo/*
                    

sudo chown -R odoo:odoo /odoo/*

Step 12 : Create server config file

                        
sudo touch /etc/odoo-server.conf
                    

sudo touch /etc/odoo-server.conf

                        
sudo su root -c "printf '[options] \n; This is the password that allows database operations:\n' >> /etc/odoo-server.conf"
                    

sudo su root -c "printf '[options] \n; This is the password that allows database operations:\n' >> /etc/odoo-server.conf"

                        
sudo su root -c "printf 'admin_passwd = admin\n' >> /etc/odoo-server.conf"
                    

sudo su root -c "printf 'admin_passwd = admin\n' >> /etc/odoo-server.conf"

                        
sudo su root -c "printf 'xmlrpc_port = 8069\n' >> /etc/odoo-server.conf"
                    

sudo su root -c "printf 'xmlrpc_port = 8069\n' >> /etc/odoo-server.conf"

                        
sudo su root -c "printf 'logfile = /var/log/odoo/odoo-server.log\n' >> /etc/odoo-server.conf"
                    

sudo su root -c "printf 'logfile = /var/log/odoo/odoo-server.log\n' >> /etc/odoo-server.conf"

                        
sudo su root -c "printf 'addons_path=/odoo/odoo-server/addons\n' >> /etc/odoo-server.conf" 
                    

sudo su root -c "printf 'addons_path=/odoo/odoo-server/addons\n' >> /etc/odoo-server.conf"

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

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

                        
sudo chmod 640 /etc/odoo-server.conf 
                    

sudo chmod 640 /etc/odoo-server.conf

Step 13 : Now Start Odoo

                        
sudo su - odoo -s /bin/bash
                    

sudo su - odoo -s /bin/bash

                        
cd /odoo/odoo-server
                    

cd /odoo/odoo-server

                        
./odoo-bin -c /etc/odoo-server.conf
                    

./odoo-bin -c /etc/odoo-server.conf

Now your odoo instance is up and running. 

Go to web browser and access your odoo at localhost:8069
6 comments

Avatar
JC
October 2021

I followed this, and I got it working, but 2 questions. For the last "how to start" section. is there any way i can make that automatic at reboot? and when i follow your instructions, you have to leave the user odoo session active. isnt that a security risk? is there another way?

Avatar
jereme
May 2021

i am getting this error while starting odoo ./odoo-bin -c /etc/odoo-server.conf odoo@ubuntu-s-1vcpu-2gb-intel-blr1-01:/odoo/odoo-server$ ./odoo-bin -c /etc/odoo-server.conf /opt/odoo/.local/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>. """) Traceback (most recent call last): File "./odoo-bin", line 5, in <module> import odoo File "/odoo/odoo-server/odoo/__init__.py", line 133, in <module> from . import http File "/odoo/odoo-server/odoo/http.py", line 57, in <module> from .tools._vendor import sessions File "/odoo/odoo-server/odoo/tools/_vendor/sessions.py", line 29, in <module> from werkzeug.posixemulation import rename ModuleNotFoundError: No module named 'werkzeug.posixemulation'

Avatar
Juergen
May 2021

missed this one during requirements.txt install: sudo apt-get install libpq-dev

Avatar
kevin
April 2021

When I run: sudo apt-get install xfonts-75dpi it claims to need xfonts-base so you may want to change that line to: sudo apt-get install xfonts-base xfonts-75dpi

Avatar
Lem
January 2021

How can i restart the service?

Avatar
Roodolphe
November 2020

Thanks for these steps to install Odoo .. nice