Install Odoo ERP on CentOS / RHEL 8 - CentLinux


Sunday, 8 November 2020

Install Odoo ERP on CentOS / RHEL 8


Odoo is an all-in-one suite of business management software tools. In this article, you will learn how to install it on CentOS / RHEL 8.


Table of Contents:


What is Odoo? :

Odoo is an all-in-one suite of business management software tools including CRM, e-commerce, billing, accounting, manufacturing, warehouse, project management, and inventory management to name a few.

Odoo project was started in Feb 2005 and it was initially named Tiny ERP. Later in April 2009 the project name was changed to OpenERP and finally it becomes Odoo (On-Demand Open Object) in Sep 2014.

Odoo is available in Community and Enterprise Editions.

The Community Edition is free and licensed under the GNU LGPLv3. Whereas the Odoo Enterprise Edition has a licensing cost depends upon the modules you want to use.

You can see the complete Odoo pricing on their official website.

Flectra is a strong competitor and odoo alternative. You should read our previous article about installation of Flectra CRM on CentOS 8.


Environment Specification:

We have provisioned a minimal installed CentOS 8 virtual machine with following specifications.

  • CPU - 3.4 Ghz (2 cores)
  • Memory - 2 GB
  • Storage - 20 GB
  • Operating System - CentOS 8.2
  • Hostname –
  • IP Address - /24


Updating Software Packages in Linux Server:

Connect with as root user by using a SSH client.

It is a best practice to update your existing software packages before installing anything new on your Linux server.

Therefore, execute dnf command to update software packages in your Linux server.

# dnf update -y

You may need to restart your operating system, if the above command updates your Linux Kernel.

# reboot

After reboot, verify the Linux Kernel and operating system versions.

# uname -r

# cat /etc/redhat-release
CentOS Linux release 8.2.2004 (Core)


Installing EPEL Yum Repository:

Some of the odoo prerequisites are provided by EPEL (Extra Packages for Enterprise Linux) yum repository. Therefore, you have to install it before installing anything else.

# dnf install -y epel-release

Build cache for newly installed yum repository.

# dnf makecache
CentOS-8 - AppStream                            2.5 kB/s | 4.3 kB     00:01
CentOS-8 - Base                                 2.1 kB/s | 3.9 kB     00:01
CentOS-8 - Extras                               1.0 kB/s | 1.5 kB     00:01
Extra Packages for Enterprise Linux Modular 8 -  21 kB/s |  97 kB     00:04
Extra Packages for Enterprise Linux 8 - x86_64  363 kB/s | 8.3 MB     00:23
Metadata cache created.


Installing Python Programming Language on Linux:

Odoo is written in Python programming language. Therefore, you have to add Python language support in our Linux server.

Python software packages can be installed from standard yum repositories by using dnf command.

# dnf install -y python36 python36-devel


Installing Odoo Prerequisite Packages:

Odoo ERP requires following software packages. These packages are available in standard yum repositories and can be installed by using dnf command.

# dnf install -y git gcc redhat-rpm-config libxslt-devel bzip2-devel openldap-devel libjpeg-devel freetype-devel

libsass package is not available in standard yum repositories, but it can be installed by using pip3 (Python Package Manager) command.

# pip3 install libsass
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.âââââ
Requirement already satisfied: libsass in /usr/local/lib64/python3.6/site-packages 
Requirement already satisfied: six in /usr/lib/python3.6/site-packages (from libsass)
Installing collected packages: libsass
Successfully installed libsass-0.20.1


Installing PostgreSQL Database Server:

Odoo uses PostgreSQL as its database backend. You can either install PostgreSQL database server on a separate machine or install it on the same Linux server.

PostgreSQL can be installed from standard yum repositories by using following Linux command.

# dnf install -y @postgresql:12


Execute following Linux command to initialize PostgreSQL database server.

# postgresql-setup --initdb --unit postgresql
 * Initializing database in '/var/lib/pgsql/data'
 * Initialized, logs are in /var/lib/pgsql/initdb_postgresql.log

Enable and start PostgreSQL database service.

# systemctl enable --now postgresql.service
Created symlink /etc/systemd/system/ â /usr/lib/systemd/system/postgresql.service.

Create a database user for Odoo business suite.

# su - postgres -c "createuser -s odoo"


Installing WKHTMLTOX on CentOS / RHEL 8:

wkhtmltox is a free and open source command line tool to render HTML into PDF or other popular formats. wkhtmltox runs completely headless and does not requires a display or display service

You can download wkhtmltox RPM from their official download page or download source code of wkhtmltox from GitHub.

Execute the following Linux commands to download wkhtmltox.

# cd /tmp
# wget
--2020-11-06 23:06:01--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16237416 (15M) [application/octet-stream]
Saving to: âwkhtmltox-0.12.6-1.centos8.x86_64.rpmâ

wkhtmltox-0.12.6-1. 100%[===================>]  15.48M   311KB/s    in 3m 24s

2020-11-06 23:09:27 (77.9 KB/s) - âwkhtmltox-0.12.6-1.centos8.x86_64.rpmâ saved [16237416/16237416]

wkhtmltox RPM has been downloaded. Now use dnf command to install it on your Linux operating system.

# dnf localinstall -y wkhtmltox-0.12.6-1.centos8.x86_64.rpm



Create Linux User for Odoo Business Suite:

Create a Linux user for Odoo business suite. This user cannot be used for authentication purpose in Odoo software, but it is only used to own the Odoo software files and processes.

# cd
# useradd -r -m -U -s /bin/bash -d /opt/odoo odoo


Installing Odoo ERP on CentOS / RHEL 8:

Switch to odoo user to start installation of Odoo ERP.

# su - odoo

Use git command to clone the Odoo source code from GitHub to Local Linux server. We are using "--branch 14.0" because we are installing Odoo 14 which is latest at the time of this writing. You can use a different numbers if you wish to install other versions of Odoo.

$ git clone \
> --depth 1 \
> --branch 14.0 \
> /opt/odoo/odoo
Cloning into '/opt/odoo/odoo'...
warning: redirecting to
remote: Enumerating objects: 29594, done.
remote: Counting objects: 100% (29594/29594), done.
remote: Compressing objects: 100% (23798/23798), done.
remote: Total 29594 (delta 9178), reused 12760 (delta 4687), pack-reused 0
Receiving objects: 100% (29594/29594), 127.59 MiB | 163.00 KiB/s, done.
Resolving deltas: 100% (9178/9178), done.
Checking out files: 100% (26075/26075), done.

Create and activate a Python virtual environment for Odoo software.

$ cd ~
$ python3 -m venv venv
$ source venv/bin/activate
(venv) $

Upgrade pip3 (Python Package Manager) by using following command.

(venv) $ pip3 install --upgrade pip
Installing collected packages: pip
  Found existing installation: pip 9.0.3
    Uninstalling pip-9.0.3:
      Successfully uninstalled pip-9.0.3
Successfully installed pip-20.2.4â

All of the required Python libraries are listed in a requirements.txt file within Odoo software directory. You can use this file with pip3 command to install all these libraries in one shot.

(venv) $ pip3 install -r odoo/requirements.txt


After sucessful installation of Odoo requirements, deactivate Python virtual environment.

(venv) $ deactivate


Post Installation Configuration:

Create a directory for installation of any Odoo addons.

$ mkdir /opt/odoo/odoo-custom-addons

Exit from odoo user shell.

$ exit

Create a Logfile for Odoo ERP and adjust file permissions.

# mkdir /var/log/odoo
# touch /var/log/odoo/odoo.log
# chown -R odoo: /var/log/odoo/

Create a configuration file in /etc directory by using vim editor.

# vi /etc/odoo.conf

Add following directives in this file.

; This is the password that allows database operations:
admin_passwd = Str0ngPa$$word
db_host = False
db_port = False
db_user = odoo
db_password = False
xmlrpc_port = 8069
logfile = /var/log/odoo/odoo.log
logrotate = True
addons_path = /opt/odoo/odoo/addons,/opt/odoo/odoo-custom-addons


Create a Systemd Service Unit:

To enable autostart of Odoo server during system startup, you are required to create a Systemd service unit.

# vi /etc/systemd/system/odoo.service

Add following directives in this file.

Requires=postgresql.service postgresql.service

ExecStart=/opt/odoo/venv/bin/python3 /opt/odoo/odoo/odoo-bin -c /etc/odoo.conf


Enable and start Odoo service.

# systemctl enable --now odoo.service
Created symlink /etc/systemd/system/ â /etc/systemd/system/odoo.service.


Configure Linux Firewall:

Odoo business suite uses default service port 8069/tcp. You have to allow this service port in Linux firewall, so that incoming traffic can access the service.

# firewall-cmd --permanent --add-port=8069/tcp
# firewall-cmd --reload


Accessing Odoo Business Suite:

Open URL in a web browser.


Provide the required parameter and Odoo will create its database in PostgreSQL server according to given parameters.


After successful configuration, the browser will be redirected to Odoo dashboard.



We have successfully installed Odoo ERP on CentOS 8. Now, you can select and install your required modules from the dashboard. You may read Odoo 14 Development Essentials - Fifth Edition by Daniel Reis, if you want to build your Odoo development skills to create powerful business applications.

No comments:

Post a Comment