Skip to content

Deploy Odoo 19 on Rocky Linux 9: Complete Guide

DeployMonkey Team · March 23, 2026 8 min read

Why Rocky Linux for Odoo?

Rocky Linux 9 is the enterprise-grade CentOS successor, offering long-term support (until 2032), SELinux integration, and RHEL binary compatibility. It is ideal for production Odoo deployments requiring stability and security compliance.

System Preparation

# Update system
sudo dnf update -y

# Enable EPEL and CRB repositories
sudo dnf install -y epel-release
sudo dnf config-manager --set-enabled crb

# Install development tools
sudo dnf groupinstall -y "Development Tools"
sudo dnf install -y python3.11 python3.11-devel \
  python3.11-pip libxml2-devel libxslt-devel \
  openldap-devel libjpeg-devel freetype-devel \
  libpq-devel gcc redhat-rpm-config

PostgreSQL Installation

# Install PostgreSQL 16
sudo dnf install -y postgresql16-server postgresql16
sudo /usr/pgsql-16/bin/postgresql-16-setup initdb
sudo systemctl enable --now postgresql-16

# Create Odoo database user
sudo -u postgres createuser --createdb --no-superuser \
  --no-createrole odoo19

# Set password
sudo -u postgres psql -c "ALTER USER odoo19 PASSWORD 'secure_pass';"

Odoo Installation

# Create odoo user
sudo useradd -m -d /opt/odoo -s /bin/bash odoo

# Clone Odoo 19
sudo -u odoo git clone --depth 1 -b 19.0 \
  https://github.com/odoo/odoo.git /opt/odoo/odoo-server

# Create virtualenv
sudo -u odoo python3.11 -m venv /opt/odoo/venv
sudo -u odoo /opt/odoo/venv/bin/pip install -r \
  /opt/odoo/odoo-server/requirements.txt

# Install wkhtmltopdf
sudo dnf install -y wkhtmltopdf

Configuration

# /etc/odoo.conf
[options]
admin_passwd = strong_admin_password
db_host = localhost
db_port = 5432
db_user = odoo19
db_password = secure_pass
addons_path = /opt/odoo/odoo-server/addons
logfile = /var/log/odoo/odoo.log
proxy_mode = True
workers = 4
max_cron_threads = 1
limit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_time_cpu = 600
limit_time_real = 1200

SELinux Configuration

# Rocky Linux has SELinux enforcing by default
# Allow Nginx to proxy to Odoo
sudo setsebool -P httpd_can_network_connect 1

# Allow Odoo to bind to port 8069
sudo semanage port -a -t http_port_t -p tcp 8069
sudo semanage port -a -t http_port_t -p tcp 8072

# If using custom paths, create SELinux policy module

Firewall Setup

# Open HTTP/HTTPS ports
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload

# Do NOT open 8069/8072 externally
# Nginx proxies all traffic

DeployMonkey Alternative

Skip manual Rocky Linux setup. DeployMonkey deploys Odoo 19 automatically on any VPS with SSL, Nginx, backups, and monitoring configured in minutes.