Step by step process to install and configure Odoo ERP on Ubuntu 20.04 LTS ?

Odoo is a simple and most popular open-source intuitive suite of business applications that support companies or individuals to run and manage their business. 

Using this platform, individuals can manage invoices, customers, inventories, products, and more. 

It includes a wide range of accounting and human resource components to help manage finances and employees.

You can install this platform in different ways, according to business use cases and available technologies. 

The most simple and easiest way to install this platform from Odoo official Apt repository.

Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform Software Installation tasks on Linux Servers.

In this context, we shall look into how to install and configure the Odoo 14 server on Ubuntu 20.04 system.


Steps to install and configure Odoo ERP on Ubuntu 20.04 LTS ?

Before starting the installation, you need to install some prerequisites on your system that are necessary to run this software. 

So, follow the following steps to install all prerequisites.


1. Install Dependencies or Prerequisites of Odoo 14

For the custom installation of Odoo 14, you need to install required packages such as Node.js, Git, Pip, and other tools on your system. 

i. The following command is used to install the required packages:

$ sudo apt update

ii. Then, install python3 packages by executing the following commands:

$ sudo apt install git python3-pip build-essential wget python3-dev python3-venv \
python3-wheel libfreetype6-dev libxml2-dev libzip-dev libldap2-dev libsasl2-dev \
python3-setuptools node-less libjpeg-dev zlib1g-dev libpq-dev \
libxslt1-dev libldap2-dev libtiff5-dev libjpeg8-dev libopenjp2-7-dev \
liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev libxcb1-dev


2. Create Odoo user

You can't run Odoo under the root user due to some security risk. Therefore, you will create a new user for running the Odoo services. Users will group under the home directory such as /opt/odoo14

Using the following command you can perform this task:

$ sudo useradd -m -d /opt/odoo14 -U -r -s /bin/bash odoo14

You can assign any name to the above user as per your requirements.


3. Install PostgreSQL

Odoo platform stores contents using the PostgreSQL database. 

i. So, you will install it with all dependencies by using the following command:

$ sudo apt install postgresql

After completing the installation of PostgreSQL, create a user with the exact same name as you have created the above Odoo system user. 

In the above step, we have created an Odoo user with the name odoo14. 

ii. Therefore, the name of the PostgreSQL user will remain the same.

$ sudo su - postgres -c "createuser -s odoo14"


4. Install wkhtmltopdf

The wkhtmltopdf is an open-source and set of command-line tools that are used for generating PDF reports and image formats from the HTML design. 

i. So, using these tools, you can print PDF reports in Odoo platform, you will install the wkhtmltox package. 

The wkhtmltopdf version 0.12.5 is recommended for Odoo14, which you can easily download from Github:

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

ii. Once the download is completed, install this package by using the following command:

$ sudo apt install ./wkhtmltox_0.12.6-1.bionic_amd64.deb

iii. Now, these processes will install all prerequisites on your system. 

iv. Next, you can start the installation of Odoo14 in the next step.


5. Install and Configure Odoo 14

We will install Odoo 14 inside the python virtual environment. So, switch a user as odoo14 which we have created in the above user creation step. 

i. Execute the following command to change user:

$ sudo su - odoo14

ii. Now, in the next step clone the Odoo 14 package by using the following command:

$ git clone https://www.github.com/odoo/odoo --depth 1 --branch 14.0 /opt/odoo14/odoo

iii. For Odoo installation, you need to create a new python virtual environment using the below-given commands:

$ cd /opt/odoo14
$ python3 -m venv odoo-venv

iv. The virtual environment will be activated by using the following command:

$ source odoo-venv/bin/activate

v. Now, using pip3 install all the necessary packages:

$ pip3 install wheel
$ pip3 install -r odoo/requirements.txt

vi. Once you have installed the above packages, deactivate the virtual environment using the below-given command:

$ deactivate

vii. To keep the third party addons, create a new directory.

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

viii. Exit from this environment, type the following command:

$ exit

ix. Create a new configuration file for Odoo 14 and paste the following content into it:

$ sudo nano /etc/odoo14.conf
[options]
; This is the password that allows database operations:
admin_passwd = my_admin_passwd
db_host = False
db_port = False
db_user = odoo14
db_password = False
addons_path = /opt/odoo14/odoo/addons,/opt/odoo14/odoo-custom-addons

6. Create Systemd Unit files

i. Create a new service unit file named 'odoo14.service' by typing the following command and paste the below content in this file:

$ sudo nano /etc/systemd/system/odoo14.service
[Unit]
Description=Odoo14
Requires=postgresql.service
After=network.target postgresql.service
[Service]
Type=simple
SyslogIdentifier=odoo14
PermissionsStartOnly=true
User=odoo14
Group=odoo14
ExecStart=/opt/odoo14/odoo-venv/bin/python3 /opt/odoo14/odoo/odoo-bin -c /etc/odoo14.conf
StandardOutput=journal+console
[Install]
WantedBy=multi-user.target

ii. Now, reload the systemd unit daemon and enable the Odoo 14 services.

$ sudo systemctl daemon-reload
$ sudo systemctl enable --now odoo14

iii. Check the status of Odoo services that they are running or not:

$ sudo systemctl status odoo14

iv. To check the Odoo messages logs, use the below-given command on the terminal:

$ sudo journalctl -u odoo14


How to Test the installation of Odoo14 ?

To test the Odoo installation, type localhost: 8069 or www.example.com:8069 in your browser and you will see its interface in your browser.


[Need urgent assistance to install and Configure Odoo ERP on Ubuntu? We are available. ]

This article will guide you on how to install and configure the Odoo14 on #Ubuntu 20.04 system. Also you will learn how to install required #PostgreSQL and wkhtmltopdf packages on your system. 

1. Odoo Community Edition is the free basic version of Odoo supported by open source software. 

2. #Odoo #CRM (Customer Relationship Management) system is a powerful browser-based sales software designed to increase organisational efficiency. Odoo, contains all of the applications that your sales, marketing, accounts department and management teams need in the one place.

3. Once all dependencies are set up, Odoo can be launched by running odoo-bin , the command-line interface of the server. It is located at the root of the Odoo Community directory.

4. Once Odoo installed, you can verify the service is up and running and is enabled to automatically start at system #boot. 

5. By default, Odoo listens on port 8069 and you can verify it using the netstat or ss tools. 

This is another way to confirm that Odoo is up and running.

Related Posts