Below is the steps to run Odoo 15 on Ubuntu 22.04:
-
Install some packages sudo apt update sudo apt upgrade -y sudo apt install -y software-properties-common wget git build-essential xfonts-75dpi xfonts-base fontconfig libxrender1 node-less libjpeg-dev gdebi postgresql build-essential wget libxslt-dev libzip-dev libldap2-dev libsasl2-dev node-less libjpeg-dev gdebi libpq-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev libffi-dev python3-pypdf2 python3-pil python3-reportlab python3-passlib python3-werkzeug python3-lxml python3-decorator python3-polib python3-psycopg2 python3-dateutil python3-psutil python3-psutil python3-docutils python3-qrcode python3-stdnum python3-zeep python3-pip python3-venv python3-gevent python3-ofxparse python3-ldap
-
Create OS user and DB user sudo useradd -d /odoo -s /bin/bash odoo sudo su - postgres -c "createuser -s odoo"
-
Download Odoo 15 git clone --depth 1 --branch 15.0 https://www.github.com/odoo/odoo /odoo/odoo-server
-
Install wkhtmltox wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb sudo dpkg -i wkhtmltox_0.12.6.1-2.jammy_amd64.deb rm wkhtmltox_0.12.6.1-2.jammy_amd64.deb
-
Create Odoo configuration file # nano /etc/odoo-server.conf [options] admin_passwd = admin logfile = /var/log/odoo/odoo-server.log addons_path=/odoo/odoo-server/addons,/odoo/custom/addons
-
Create directory custom addons and log sudo mkdir -p /odoo/custom/addons /var/log/odoo sudo chown -R odoo:odoo /odoo /var/log/odoo /etc/odoo-server.conf
-
Install some requirement modules sudo su odoo -c 'pip3 install -r /odoo/odoo-server/requirements.txt'
-
Run this just for testing sudo su odoo -c '/odoo/odoo-server/odoo-bin -c /etc/odoo-server.conf'
-
Create Odoo Init file in order to automatically run Odoo ever reboot # nano /etc/init.d/odoo-server #!/bin/sh ### BEGIN INIT INFO # Provides: odoo-server # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Should-Start: $network # Should-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Enterprise Business Applications # Description: ODOO Business Applications ### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin DAEMON=/odoo/odoo-server/odoo-bin NAME=odoo-server DESC=odoo-server # Specify the user name (Default: odoo). USER=odoo # Specify an alternate config file (Default: /etc/openerp-server.conf). CONFIGFILE="/etc/odoo-server.conf" # pidfile PIDFILE=/var/run/${NAME}.pid # Additional options that are passed to the Daemon. DAEMON_OPTS="-c $CONFIGFILE" [ -x $DAEMON ] || exit 0 [ -f $CONFIGFILE ] || exit 0 checkpid() { [ -f $PIDFILE ] || return 1 pid=`cat $PIDFILE` [ -d /proc/$pid ] && return 0 return 1 } case "${1}" in start) echo -n "Starting ${DESC}: " start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER --background --make-pidfile --exec $DAEMON -- $DAEMON_OPTS echo "${NAME}." ;; stop) echo -n "Stopping ${DESC}: " start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo echo "${NAME}." ;; restart|force-reload) echo -n "Restarting ${DESC}: " start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo sleep 1 start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER --background --make-pidfile --exec $DAEMON -- $DAEMON_OPTS echo "${NAME}." ;; *) N=/etc/init.d/$NAME echo "Usage: $NAME {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0
-
Run odoo-server service sudo chmod 755 /etc/init.d/odoo-server sudo chown root: /etc/init.d/odoo-server sudo update-rc.d odoo-server defaults sudo service odoo-server start
-
Check Odoo log file tail -f /var/log/odoo/odoo-server.log
-
Use web browser to access Odoo http://serveripaddress:8069
Install Odoo 15 on Ubuntu 22.04