Odoo 15 is a powerful, open-source ERP solution, and installing it on Ubuntu 20.04 can be straightforward if you follow the right steps. This guide will take you through every step of the process, ensuring that your Odoo installation is smooth and optimized for performance.
Prerequisites
- A clean installation of Ubuntu 20.04.
- Sudo privileges on your system.
- Basic knowledge of terminal commands.
Step 1: Update System Packages
Before installing any software, it’s essential to update the existing system packages. Run the following commands:
apt update
apt upgrade -y
Step 2: Install Required Dependencies
To ensure Odoo runs smoothly, install the necessary libraries and tools:
apt install git python3-pip build-essential wget python3-dev python3-venv \
python3-wheel libfreetype6-dev libxml2-dev libzip-dev libldap2-dev libsasl2-dev \
python3-setuptools node-less libjpeg-dev zlib1g-dev libpq-dev \
libxslt1-dev libldap2-dev libtiff5-dev libjpeg8-dev libopenjp2-7-dev \
liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev libxcb1-dev -y
Step 3: Create a System User for Odoo
To run Odoo securely, create a dedicated user:
useradd -m -d /opt/odoo15 -U -r -s /bin/bash odoo15
Step 4: Install and Configure PostgreSQL
Odoo uses PostgreSQL as its database. Install and create a user for Odoo:
apt install postgresql -y
sudo su - postgres -c "createuser -s odoo15"
Step 5: Install Wkhtmltopdf
For PDF reporting, download and install Wkhtmltopdf:
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 -y
Step 6: Clone the Odoo Repository
Clone the Odoo 15 source code from GitHub:
su - odoo15
git clone https://www.github.com/odoo/odoo --depth 1 --branch 15.0 /opt/odoo15/odoo
exit
Step 7: Set Up the Python Virtual Environment
Create a virtual environment and install dependencies:
su - odoo15
cd /opt/odoo15
python3 -m venv odoo-venv
source odoo-venv/bin/activate
pip3 install wheel
pip3 install -r odoo/requirements.txt
deactivate
mkdir /opt/odoo15/odoo-custom-addons
exit
Step 8: Configure Odoo
Create an Odoo configuration file:
nano /etc/odoo15.conf
Add the following configuration:
[options]
; This is the password that allows database operations:
admin_passwd = my_admin_passwd
db_host = False
db_port = False
db_user = odoo15
db_password = False
addons_path = /opt/odoo15/odoo/addons,/opt/odoo15/odoo-custom-addons
Step 9: Create a Systemd Service File
To run Odoo as a service, create a Systemd service file:
nano /etc/systemd/system/odoo15.service
Add the following:
[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/odoo-venv/bin/python3 /opt/odoo15/odoo/odoo-bin -c /etc/odoo15.conf
StandardOutput=journal+console
[Install]
WantedBy=multi-user.target
Step 10: Start and Enable the Odoo Service
Reload the systemd daemon, enable, and start the Odoo service:
systemctl daemon-reload
sudo systemctl enable --now odoo15
sudo systemctl status odoo15
Step 11: Verify Installation
Check the logs for any errors:
journalctl -u odoo15
Step 12: Access Odoo
Finally, open your browser and navigate to:
http://<your_server_ip>:8069
Replace <your_server_ip> with your server’s actual IP address. You should now see the Odoo 15 interface.
Conclusion
By following these steps, you can successfully install Odoo 15 on Ubuntu 20.04. If you encounter issues during the installation, refer to the logs for troubleshooting.
Keywords:
- Install Odoo 15 Ubuntu
- Odoo 15 prerequisites
- Odoo ERP installation
- Wkhtmltopdf Odoo 15
- Configure Odoo Ubuntu 20.04
