At the time of writing this article, Odoo ERP 17 is the most recent version of the amazing open-source Enterprise Resource Planning (ERP) software created to help your business processes to stay streamlined. Odoo ERP gives you a platform with integrated applications to solve all your business problems, from HR, CRM, Inventory management, Finance, Manufacturing, Sales to Ecommerce. In Odoo ERP, all these integrations are distributed through a modular approach which allows you to start few modules and integrate more on need basis. This makes Odoo a highly flexible and scalable solution.
To install Odoo ERP 17 on Rocky Linux, AlmaLinux, CentOS, or RHEL 9/8 you need to follow several steps:
- Installation of dependencies required to run Odoo 17
- Creation of Python virtual environment
- Installation of Odoo 17 on Rocky / AlmaLinux / RHEL 9|8
- Configuration of Odoo and web server
- Accessing and using Odoo
For Odoo ERP 17 features, see Odoo 17 Release Notes
Prerequisites
Before you can proceed you will need to meet the following requirements.
System Requirements:
- Operating System: Installed Rocky, Alma, CentOS Stream, or RHEL 8/9
- CPU: Minimum dual-core CPU (If you have Quad-core the better).
- RAM: Minimum 2GB of memory (If you get 4GB or higher the better).
- Disk: Minimum 20GB of free disk space for storing Odoo data.
Software Requirements:
- Python: Python 3.10 or higher.
- PostgreSQL: PostgreSQL 12 or above.
- Node.js and npm: Node.js 12.x or higher and npm for asset management.
- Wkhtmltopdf: A specific version of wkhtmltopdf (0.12.5 or 0.12.6) is required for printing PDF reports.
- Nginx or Apache: For reverse proxying (Nginx is generally preferred).
Let’s begin the installation of Odoo ERP.
Step 1 – Install build dependencies
Update your system before any installations:
sudo dnf -y update
If you have kernel updates, consider a system reboot before you proceed further:
sudo reboot
Next install development tools in your system.
sudo dnf groupinstall -y "Development Tools"
Install additional libraries that may be required when building Odoo from source:
sudo dnf install -y vim git gcc bzip2-devel redhat-rpm-config libxslt-devel openldap-devel libjpeg-devel freetype-devel
Step 2 – Install Python 3.11 & Node.js
We need to install Python 3.10+. In this article we will use Python 3.11.
sudo dnf install python3.11 python3.11-devel python3.11-pip
Confirm it’s installed successfully by checking the version.
$ python3.11 --version
Python 3.11.9
Let’s also install Node.js. There is no specific version, we will use Nodejs v18.
sudo dnf module reset nodejs -y
sudo dnf module install nodejs:18 -y
Verify by checking Node.js version number.
$ node --version
v18.20.2
Install rtlcss node module using npm
:
sudo npm install -g rtlcss
Also install Less and Less Plugin Clean CSS:
sudo npm install -g less less-plugin-clean-css
Step 3 – Install and Configure PostgreSQL database
PostgreSQL 12+ is required. We can install PostgreSQL 16 which is available in OS APPStream repositories. Reset current PostgreSQL module.
sudo dnf module -y disable postgresql
Enable PostgreSQL 16 module.
sudo dnf install -y @postgresql:16
Also install postgresql-devel package.
sudo dnf install -y postgresql-devel
Initialize database server.
sudo postgresql-setup initdb
Start and enable database service.
sudo systemctl enable --now postgresql
Finally create odoo
database user. Provide password for the user when you are prompted.
sudo su - postgres -c "createuser -s odoo"
To create a user with password run:
sudo -u postgres createuser odoo -U postgres -dP
For remote PostgreSQL database server you will enable remote connections in your DB server for Odoo to connect to it.
Step 4 – Install wkhtmltopdf
Wkhtmltopdf is an open-source CLI tool used by Odoo to render HTML into PDF and other image formats through the powerful Webkit rendering engine.This is required for generation of documents such as invoices, reports, and other printable documents.
Download and install wkhtmltopdf RPM package.
- RHEL 9 based systems
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox-0.12.6.1-2.almalinux9.x86_64.rpm
sudo dnf install -y ./wkhtmltox-0.12.6.1-2.almalinux9.x86_64.rpm
- RHEL 8 based systems
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox-0.12.6.1-2.almalinux8.x86_64.rpm
sudo dnf install -y ./wkhtmltox-0.12.6.1-2.almalinux8.x86_64.rpm
Validate installation:
$ wkhtmltopdf --version
wkhtmltopdf 0.12.6.1 (with patched qt)
Step 5 – Setup Odoo Python Environment
Create user called odoo that will run Odoo services.
sudo useradd -m -U -r -d /opt/odoo -s /bin/bash odoo
Install virtualenv:
sudo pip3.11 install virtualenv
Switch to created odoo
user account.
sudo su - odoo
Clone Odoo’s Github repository locally.
git clone --depth 1 --branch 17.0 --single-branch https://github.com/odoo/odoo.git
Use virtualenv
command to create python virtual environment for Odoo ERP.
virtualenv odoo-venv
Activate the virtual environment created.
source odoo-venv/bin/activate
Upgrade pip
after activating.
pip3.11 install --upgrade pip
Install wheel python package in the environemnt
pip3.11 install wheel
Install Odoo 17 python requirements
pip3.11 install -r odoo/requirements.txt
To list all the Python packages installed in the virtual environment run the following command:
pip3.11 list
Create a directory that will store all 3rd party addons.
mkdir odoo/custom-addons
Exit the virtual environment.
exit
Step 6 – Configure Odoo ERP
Copy sample Odoo configuration file to /etc
directory on your system.
sudo cp /opt/odoo/odoo/debian/odoo.conf /etc/odoo.conf
The odoo.conf
file contains key configurations required for Odoo to run properly. Open the file for editing.
# Open with vim
sudo vim /etc/odoo.conf
# Open with nano
sudo nano /etc/odoo.conf
Adjust the settings to look like below.
[options]
; This is the password that allows database operations:
admin_passwd = Str0ngAdminPasw0rd
db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = /opt/odoo/odoo/addons, /opt/odoo/odoo/custom-addons
default_productivity_apps = True
xmlrpc_port = 8069
For remote PostgreSQL server, set:
- db_host: PostgreSQL database server IP address
- db_password: Password for the user created on remote database
- db_user: Remote database user created.
Give the file appropriate permissions:
sudo chown odoo:odoo /etc/odoo.conf
sudo chmod 640 /etc/odoo.conf
Create Odoo systemd service.
sudo tee /etc/systemd/system/odoo.service<<EOF
[Unit]
Description=Odoo ERP System
Documentation=http://www.odoo.com
Requires=postgresql.service
After=network.target postgresql.service
[Service]
Type=simple
SyslogIdentifier=odoo
PermissionsStartOnly=true
User=odoo
Group=odoo
ExecStart=/opt/odoo/odoo-venv/bin/python3.11 /opt/odoo/odoo/odoo-bin \
--config=/etc/odoo.conf \
--addons-path=/opt/odoo/odoo/addons/ \
--logfile /var/log/odoo/odoo-server.log
StandardOutput=journal+console
KillMode=mixed
[Install]
WantedBy=multi-user.target
EOF
Create logs directory.
sudo mkdir /var/log/odoo/
sudo chown -R odoo:odoo /var/log/odoo/
Start and enable odoo
service.
sudo systemctl daemon-reload
sudo systemctl enable --now odoo.service
Check service status if running correctly.
$ systemctl status odoo
● odoo.service - Odoo ERP System
Loaded: loaded (/etc/systemd/system/odoo.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2024-07-18 11:34:34 UTC; 21s ago
Docs: http://www.odoo.com
Main PID: 70809 (python3.11)
Tasks: 4 (limit: 48750)
Memory: 88.2M
CGroup: /system.slice/odoo.service
└─70809 /opt/odoo/odoo-venv/bin/python3.11 /opt/odoo/odoo/odoo-bin --config=/etc/odoo.conf --addons-path=/opt/odoo/odoo/addons/ --logfile /var/log/odoo/odoo-server.log
Jul 18 11:34:34 rocky8.cloudspinx.com systemd[1]: Started Odoo ERP System.
Step 7 – Configure firewalld
The service is listening on port 8069
.
$ ss -tunelp | grep 8069
tcp LISTEN 0 128 0.0.0.0:8069 0.0.0.0:* users:(("python3.11",pid=70809,fd=4)) uid:989 ino:115353 sk:5 <->
If you have firewalld, allow port 8069
sudo firewall-cmd --add-port=8069/tcp --permanent
sudo firewall-cmd --reload
You can access Odoo web console on http://serverip:8069 and finish the setup.

Enter admin_passwd value set in odoo.conf
for Master password. Specify database name to create example is odoo17. Then create first admin user by providing email address and password. Optionally set phone number, language and country.
After finishing the setup, login with the admin user created and its password.

You will get to Odoo dashboard for enabling modules e.t.c.

Step 8 – Configure Nginx Proxy
We can use Nginx to proxy requests to Odoo ERP. Install nginx package.
sudo dnf -y install nginx
Enable service to start automatically at system boot.
sudo systemctl enable nginx
Create Nginx configuration file for Odoo service.
sudo vim /etc/nginx/conf.d/odoo.conf
Paster and edit the following contents. You must replace odoo.example.com with your actual domain name.
# Odoo Upstreams
upstream odooserver {
server 127.0.0.1:8069;
}
server {
listen 80;
server_name odoo.example.com;
access_log /var/log/nginx/odoo_access.log;
error_log /var/log/nginx/odoo_error.log;
# Proxy settings
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
# Request for root domain
location / {
proxy_redirect off;
proxy_pass http://odooserver;
}
# Cache static files
location ~* /web/static/ {
proxy_cache_valid 200 90m;
proxy_buffering on;
expires 864000;
proxy_pass http://odooserver;
}
# Gzip Compression
gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;
gzip on;
}
Validate nginx configurations.
$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
If everything looks okay restart the service.
sudo systemctl restart nginx
Access Odoo web dashboard on http://yourdomain.com
Step 9 – Using Let’s Encrypt SSL
For servers on a public domain, you can use free Let’s Encrypt SSL.
Install certbot
and its Nginx plugin.
sudo dnf install epel-release
sudo dnf install certbot python3-certbot-nginx -y
Request for Let’s Encrypt SSL.
DOMAIN=odoo.example.com #replace with your actual domain
sudo certbot --nginx -d $DOMAIN --agree-tos
If you don’t want to provide email address useL
sudo certbot --nginx -d $DOMAIN --agree-tos --register-unsafely-without-email
Sample output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Account registered.
Requesting a certificate for odoo.example.com
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/odoo.example.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/odoo.example.com/privkey.pem
This certificate expires on 2024-10-16.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
Deploying certificate
Successfully deployed certificate for odoo.cloudlabske.com to /etc/nginx/conf.d/odoo.conf
Congratulations! You have successfully enabled HTTPS on https://odoo.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
* Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
* Donating to EFF: https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
It will automatically configure /etc/nginx/conf.d/odoo.conf
to include SSL.
cat /etc/nginx/conf.d/odoo.conf
Conclusion
We have concluded our tutorial on the installation of Odoo on Rocky, AlmaLinux, CentOS and RHEL 9 Linux systems. We started by preparing the server with the necessary dependencies then we proceed to install and configure Odoo ERP. With Odoo extensive module, flexible and powerful customizations, it makes it a well-suited business solution to automate processes.