Home Linux ServerWeb Server How to install Odoo 15 on Ubuntu 22.04

How to install Odoo 15 on Ubuntu 22.04

by Thạch Phạm
Published: Last Updated on
A+A-
Reset

Installing Odoo 15 trên Ubuntu 22.04 with 8 steps.

Introduction

Odoo is an open-source business administration software using the Python programming language. Odoo/OpenERP offers a wide range of options with over 1000 modules ready to be downloaded and used. Most modules can be obtained for free. Several modules are included in the Odoo software, such as Sales, Manufacturing, Purchasing, Warehouse, HRD, Accounting, Websites and E-Commerce.

Odoo/OpenERP is integrated with cloud computing technology, extremely suitable for small and medium businesses in all industries and fields. Currently, Odoo has always been the first choice for businesses, not only in Vietnam but also in the world, the number of people interested in Odoo is also outstanding.

On average, Odoo has more than 1000 downloads/day and is the most used open-source solution to support effective business management worldwide. The current odoo business management software has over 2,000,000 users and is translated into 23 languages, serving businesses worldwide. This technology platform shapes a large community with a huge number of users. Thereby, members can exchange issues. It is also quite flexible software.

Odoo software is the leading business management solution today because:

  • Multidisciplinary development.
  • Easily add Modules.
  • Construction cost savings.
  • Comprehensive management.

Implementation Guide

Step 1: Update the system

You proceed to update the packages installed on the Ubuntu system with the command:

AZDIGI Tutorial
sudo apt update -y && apt upgrade -y
    

Step 2: Install python3 and the necessary components

After updating the system, you need to install python3 and other necessary components to set up Odoo 15 on Ubuntu 22. To install, please run the command below:

AZDIGI Tutorial
sudo apt install python3-pip  wget python3-dev python3-venv python3-wheel libxml2-dev libpq-dev libjpeg8-dev liblcms2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev build-essential git libssl-dev libffi-dev libmysqlclient-dev libjpeg-dev libblas-dev libatlas-base-dev -y
    
How to install Odoo 15 on Ubuntu 22.04

Step 3: Install and Configure PostgreSQL

The Odoo system will use PostgreSQL as the backing database. To install PostgreSQL, run the following command:

AZDIGI Tutorial
sudo apt install postgresql -y
    
How to install Odoo 15 on Ubuntu 22.04

After successfully installing PostgreSQL, you need to create a new PostgreSQL user and name that user odoo15 with the command below:

AZDIGI Tutorial
sudo su - postgres -c "createuser -s odoo15"
    

Step 4: Create a system user

  • To create a system user for the Odoo15 version, execute the following command:
AZDIGI Tutorial
sudo useradd -m -d /opt/odoo15 -U -r -s /bin/bash odoo15
    

Step 5: Install wkhtmltopdf

  • Wkhtmltopdf is an open source command line tool that renders HTML to PDF format using the Qt WebKit rendering engine. This tool is needed to print PDF reports in Odoo. And to install wkhtmltopdf, run the command below:
AZDIGI Tutorial
sudo apt-get install wkhtmltopdf -y
    
  • To check if the installation is successful, execute the following command:
AZDIGI Tutorial
wkhtmltopdf --version
    
How to install Odoo 15 on Ubuntu 22.04

Step 6: Install and configure Odoo 15

  • Before going into the settings, you first need to access the user odoo15 created (In step 3) by the command:
AZDIGI Tutorial
su - odoo15
    
  • Download the Odoo15 repository from Github by the command:
AZDIGI Tutorial
git clone https://www.github.com/odoo/odoo --depth 1 --branch 15.0 /opt/odoo15/odoo
    
How to install Odoo 15 on Ubuntu 22.04
  • Move into the odoo15 directory by the command:
AZDIGI Tutorial
cd /opt/odoo15
    
  • Create a virtual environment by the command:
AZDIGI Tutorial
python3 -m venv myodoo15-venv
    
  • Activate the virtual environment by the command:
AZDIGI Tutorial
source myodoo15-venv/bin/activate
    
How to install Odoo 15 on Ubuntu 22.04
  • In the virtual environment, you install the necessary python modules by the command:
AZDIGI Tutorial
pip3 install wheel
pip3 install -r odoo/requirements.txt
    
How to install Odoo 15 on Ubuntu 22.04
  • Exit the virtual environment with the command:
AZDIGI Tutorial
deactivate
    
  • Create the directory containing the modules with the following command:
AZDIGI Tutorial
mkdir /opt/odoo15/custom-addons
    
  • Proceed to exit user odoo15 with the command:
AZDIGI Tutorial
exit
    
  • Create a configuration file for Odoo15 with the command:
AZDIGI Tutorial
sudo nano /etc/odoo15.conf
    

And add the following content:

[options]
; This is the password that allows database operations:
admin_passwd = admin_password
db_host = False
db_port = False
db_user = odoo15
db_password = False
xmlrpc_port = 8069
logfile = /var/log/odoo15/odoo.log
addons_path = /opt/odoo15/odoo/addons,/opt/odoo15/custom-addons

Note: Replace admin_password with your password.

  • Create logging directory and directory permissions
AZDIGI Tutorial
mkdir /var/log/odoo15
chown odoo15:root /var/log/odoo15
    

Step 7: Create Systemd service on Odoo15

To easily manage Odoo15, you need to create a systemd file with the command below:

AZDIGI Tutorial
sudo nano /etc/systemd/system/odoo15.service
    

And add the following content:

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

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

[Install]
WantedBy=multi-user.target
  • Reload the systemd daemon to apply the changes with the command
AZDIGI Tutorial
sudo systemctl daemon-reload
    
  • Start and enable the Odoo15 service
AZDIGI Tutorial
sudo systemctl enable --now odoo15Sao chép
    
  • Check the status of the Odoo15 service
AZDIGI Tutorial
sudo systemctl status odoo15
    
How to install Odoo 15 on Ubuntu 22.04

Step 8: Access Odoo15 to check

After completing the installation, you can access Odoo15 by following the link: http://ipaddress:8069. If you access the interface below, it means that you have successfully installed Odoo15.

How to install Odoo 15 on Ubuntu 22.04

So AZDIGI has shown you how to completely install Odoo15 on Ubuntu 22.04 server. Hopefully, this article will give you the best solution for your business with Odoo15. Wishing you success!

You can refer to other instructions at the link below:

If you need support, you can contact support in the ways below:

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign