How to Install and Configure Odoo on Ubuntu 20.04

how to install and configure odoo on ubuntu 20.04

Odoo is a complete management software for business it covers ERP (Enterprise Resource Planning), CRM (Customer Relationship Management), industrial management, invoice management, property management, POS (Point of Sale) management, marketing campaign management, employee management, financial management. Odoo is an open source platform and it will suit for enterprises and freelancers. Odoo having more business apps to manage businesses. Odoo is built with python and JavaScript. Odoo uses PostgreSQL database.

In this tutorial we will explain how to install odoo on ubuntu 20.04 with easy and most recommended steps. Let’s get started.

Install Odoo on ubuntu 20.04:

Let’s begin the installation and configuration of Odoo  on ubuntu 20.04. Before installing Odoo we need to update packages and install some Odoo required packages.

Update Packages:

Before starting the installation of Odoo 13 update the packages.

sudo apt update

Install Required Packages:

After updating packages we need to install the Odoo 13 required packages Node.js, Git, Pip.

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

Create User:

Once the package installation is completed, now create the user for Odoo. Create the Directory and create the Odoo user.

sudo useradd -m -d /opt/odoobms -U -r -s /bin/bash odoouser

Install PostgreSQL:

Now install the PostgreSQL database because Odoo uses PostgreSQL database. To install the PostgreSQL run the command below.

sudo apt install postgresql

After installing postgressql create the user for postgressql.

sudo su - postgres -c "createuser -s odoouser"

Wkhtmltopdf Installation:

Now install the Wkhtmltopdf package, it is a open source tool for rendering HTML to PDf and image formats. Wkhtmltopdf using Qt WebKit for render process and also we need wkhtmltopdf for printing files.

We can download and install Wkhtmltopdf package through GitHub. To install Wkhtmltopdf package run the commands below.

wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo apt install ./wkhtmltox_0.12.5-1.bionic_amd64.deb

Odoo Installion and Configuration:

After completing successful setup process for Odoo 13, now install and configure the Odoo 13 on ubuntu 20.04. Odoo 13 is the latest version at the time of writing this article.

Now Jump to the Odoo User before we created.

sudo su - odoouser

Now clone the Odoo 13 source code from GitHub.

git clone https://www.github.com/odoo/odoo --depth 1 --branch 13.0 /opt/odoobms/odoo13

After downloading Odoo 13 source code and go to /opt/odoobms directory and create Python virtualenv.

cd /opt/odoobms
python3 -m venv odoo-venv

Now activate the Python virtualenv (virtual environment).

source odoo-venv/bin/activate

After activating python virtualenv (virtual Environment), then install the required python modules using pip3.

pip3 install wheel
pip3 install -r odoo13/requirements.txt

Now deactivate the Python virtualenv (virtual Environment).

deactivate

Create a separate folder Odoo add-ons and exit.

mkdir /opt/odoobms/odoo-addons
exit

Now create the Odoo configuration file.

sudo nano /etc/odoo13.conf

Copy and paste the below lines.

Note: fill the admin_passwd line with secured password whatever you want and add the add-ons’ path.

[options]
; This is the password that allows database operations:
admin_passwd = secure_password_here
db_host = False
db_port = False
db_user = odoouser
db_password = False
addons_path = /opt/odoobms/odoo13/addons,/opt/odoobms/odoo-addons

After configuration save and exit the conf file.

Systemd Unit File Creation:

To create the systemd unit file run the command below.

sudo nano /etc/systemd/system/odoo13.service

Now copy and paste the below lines into the oddo13.service file, then save and exit.

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

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

[Install]
WantedBy=multi-user.target

After creating system unit file reload daemon and start the odoo service.

sudo systemctl daemon-reload
sudo systemctl enable --now odoo13

Now check the Odoo status.

sudo systemctl status odoo13

Access Odoo Web Portal:

To access Odoo web portal go to your browser and acess your ip_address or domain_name with 8069 port.

Note: We need to open 8069 port.

http://your_ip_address or http://your_domain_name

Now you will see web portal of Odoo 13. Type the master password before we created in odoo13.conf file and fill the required fields and click create database.

Now we can explore the Odoo dashboard.

That’s all we have completed the installation and configuration of Odoo 13.

Conclusion:

We have successfully installed and configured Odoo 13 on ubuntu 20.04. In this tutorial we have learned how to install and configure Odoo 13 on Ubuntu 20.04. Hope this helps.

Next Article: How to Install and Configure Gradle on Ubuntu 20.04

Leave a Reply

Post your comments here

You May Also Like