How to install Odoo 14 on CentOS 8

Share on Social Media

Discover how to effortlessly install Odoo 14 on CentOS 8 with this comprehensive guide. From essential prerequisites to step-by-step installation instructions, master the process and unlock the power of Odoo for your business. #centlinux #linux #odoo

What is Odoo Software?

Odoo is an open-source suite of business management software designed to help businesses streamline their operations and improve efficiency. It offers a wide range of applications covering various aspects of business management, including customer relationship management (CRM), sales, inventory management, accounting, human resources, e-commerce, and more.

Key features of Odoo include:

  1. Modular Structure: Odoo is modular, allowing businesses to select and customize the specific applications they need, enabling tailored solutions for different industries and business needs.
  2. Integration: Odoo applications seamlessly integrate with each other, providing a unified platform for managing different aspects of business operations.
  3. User-Friendly Interface: Odoo offers an intuitive and user-friendly interface, making it easy for employees to learn and use the software effectively.
  4. Scalability: Odoo is scalable and can grow with businesses of all sizes, from small startups to large enterprises.
  5. Customization: Odoo is highly customizable, allowing businesses to adapt the software to their specific workflows and requirements.
  6. Community and Support: Odoo has a large and active community of users and developers who contribute to its development, provide support, and create additional modules and integrations.

Overall, Odoo is a comprehensive and flexible business management solution that helps businesses streamline their processes, improve productivity, and make informed decisions.

Read Also: How to install Odoo 16 on Rocky Linux 9

Is Odoo free?

Yes, Odoo is available as both a free and open-source Community Edition and a paid Enterprise Edition. The Community Edition of Odoo is free to download and use, providing access to the core functionality of the software and a wide range of applications covering various business needs.

The Enterprise Edition of Odoo offers additional features, support, and services tailored for larger businesses and organizations. It is provided under a subscription model, with pricing based on the number of users and the specific applications and services required.

Businesses can choose the edition of Odoo that best suits their needs and budget, whether they prefer the free Community Edition or the paid Enterprise Edition with additional features and support.

Recommended Online Training: Odoo (Open ERP) Basics

416748 9aea 6show?id=oLRJ54lcVEg&offerid=1074530.416748&bids=1074530

Odoo Alternatives

Several alternatives to Odoo exist, each offering its own set of features and benefits. Some popular alternatives include:

  1. ERPNext: An open-source ERP system with modules for accounting, CRM, project management, and more. It offers a modern interface and is highly customizable.
  2. SAP Business One: A comprehensive ERP solution designed for small and midsize businesses. It provides modules for finance, sales, purchasing, inventory, and more, with robust reporting and analytics capabilities.
  3. Microsoft Dynamics 365: A suite of cloud-based business applications that includes modules for ERP, CRM, human resources, and more. It offers integration with other Microsoft products and services.
  4. NetSuite: A cloud-based ERP system that provides modules for financial management, inventory management, e-commerce, and more. It is particularly well-suited for growing businesses and offers scalability and flexibility.
  5. Zoho One: A suite of cloud-based business applications that includes CRM, accounting, HR, project management, and more. It offers integration with other Zoho products and services and is suitable for small and medium-sized businesses.
  6. Openbravo: An open-source ERP solution with modules for retail, distribution, and services. It offers multi-channel retailing capabilities and is suitable for businesses in the retail and distribution industries.

These are just a few examples of ERP systems that can serve as alternatives to Odoo. The choice of alternative depends on factors such as the specific needs of the business, budget, industry, and desired features and functionalities.

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 – odoo-01.centlinux.com
  • IP Address – 192.168.116.230 /24

Update your Linux Server

Connect with odoo-01.centlinux.com 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
4.18.0-193.19.1.el8_2.x86_64

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

Install 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.

Install Python on CentOS 8

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

Install Odoo Server 14 Prerequisites

Odoo 14 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

Install PostgreSQL on CentOS 8

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/multi-user.target.wants/postgresql.service â /usr/lib/systemd/system/postgresql.service.

Create a database user for Odoo business suite.

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

Install WKHTMLTOX on CentOS 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 https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos8.x86_64.rpm
--2020-11-06 23:06:01--  https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos8.x86_64.rpm
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.178.99
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.178.99|: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 ERP

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

Install Odoo Software on CentOS 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 https://www.github.com/odoo/odoo 
> --depth 1 
> --branch 14.0 
> /opt/odoo/odoo
Cloning into '/opt/odoo/odoo'...
warning: redirecting to https://github.com/odoo/odoo.git/
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
logout

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.

[options]
; 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.

[Unit]
Description=Odoo
Requires=postgresql.service
After=network.target postgresql.service

[Service]
Type=simple
SyslogIdentifier=odoo
PermissionsStartOnly=true
User=odoo
Group=odoo
ExecStart=/opt/odoo/venv/bin/python3 /opt/odoo/odoo/odoo-bin -c /etc/odoo.conf
StandardOutput=journal+console

[Install]
WantedBy=multi-user.target

Enable and start Odoo service.

# systemctl enable --now odoo.service
Created symlink /etc/systemd/system/multi-user.target.wants/odoo.service â /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
success
# firewall-cmd --reload
success

Accessing Odoo Server

Open URL http://odoo-01.centlinux.com:8069/ in a web browser.

Odoo Server - Create Database
Odoo Server – Create Database

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

Odoo ERP - Apps
Odoo ERP – Apps

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

You may read Odoo 14 Development Essentials – Fifth Edition (PAID LINK) by Daniel Reis, if you want to build your Odoo development skills to create powerful business applications.

Final Thoughts

Now that you’ve learned how to install Odoo 14 on CentOS 8, you’re one step closer to optimizing your business operations with this powerful software. Should you encounter any challenges during installation or require further assistance with your Odoo setup, feel free to reach out to me on Fiverr. With my expertise in Linux server administration, I can ensure a smooth installation process and help you unleash the full potential of Odoo for your business: Linux Admin Services.

Leave a Comment