In this article, we will have explained the necessary steps to installing and configure Odoo on CentOS 8. Before continuing with this tutorial, make sure you are logged in as a user with
sudo privileges. All the commands in this tutorial should be run as a non-root user.
Odoo is the most extensive open-source ERP that provides all business-related applications. It includes a wide range of applications such as CRM, e-Commerce, website builder, billing, accounting, manufacturing, warehouse, project management, inventory, and much more, all seamlessly integrated.
Install Odoo on CentOS 8
Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.
sudo dnf install epel-release sudo dnf update
Step 2. Install All Dependency Required.
Run the following command below to install it:
sudo dnf install python3 python3-devel git gcc sassc redhat-rpm-config libxslt-devel bzip2-devel openldap-devel libjpeg-devel freetype-devel
Step 3. Create an Odoo User.
Create a new system user and group that we need to run the Odoo service. The home directory we will define in the
sudo useradd -m -U -r -d /opt/odoo14 -s /bin/bash odoo14
Step 4. Install PostgreSQL.
Odoo ERP repository uses a PostgreSQL database server for data storage. Now run the following command to install it:
sudo dnf install @postgresql:12
After the installation is completed, create a new PostgreSQL database cluster:
sudo postgresql-setup initdb
Once the database cluster has been initialized, restart, and enable PostgreSQL:
sudo systemctl restart postgresql sudo systemctl enable postgresql
Step 5. Install the Wkhtmltopdf Tool.
Odoo uses wkhtmltopdf to generate reports in PDF format. The recommended version of wkhtmltopdf to install is 0.12.5:
sudo dnf install https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos8.x86_64.rpm
Step 6. Install and Configure Odoo.
Run the following command to install Odoo:
sudo su - odoo14 git clone https://www.github.com/odoo/odoo --depth 1 --branch 14.0 /opt/odoo14/odoo
Next, clone the virtual environment:
cd /opt/odoo14 python3 -m venv venv
Once the virtual environment is created, activate it using the following command:
We are now inside the virtual environment, where we can begin with the installation of the required Python modules for the Odoo installation:
pip3 install -r odoo/requirements.txt
Once done, deactivate the environment:
deactivate && exit
Next, create a new directory for the custom addons:
mkdir /opt/odoo14/odoo-custom-addons exit
In the next steps we create a configuration file with the following content:
sudo nano /etc/odoo14.conf
Add the following lines:
[options] admin_passwd = your_admin_passwd db_host = False db_port = False db_user = odoo14 db_password = False addons_path = /opt/odoo14/odoo/addons, /opt/odoo14/odoo-custom-addons
Step 7. Create a systemd Unit File.
Now create a service unit file called
odoo14.service with the following content:
sudo nano /etc/systemd/system/odoo14.service
Paste the following content:
[Unit] Description=Odoo14 Requires=postgresql.service After=network.target postgresql.service [Service] Type=simple SyslogIdentifier=odoo14 PermissionsStartOnly=true User=odoo14 Group=odoo14 ExecStart=/opt/odoo14/venv/bin/python3 /opt/odoo14/odoo/odoo-bin -c /etc/odoo14.conf StandardOutput=journal+console [Install] WantedBy=multi-user.target
Once the file is saved and closed, we will reload the daemon:
sudo systemctl daemon-reload sudo systemctl enable --now odoo14 sudo systemctl status odoo14
Step 8. Accessing Odoo 14 Web Interface.
To access Odoo 14, go to the following URL and create a new database:
If the installation has been successfully completed, you will be able to see the Odoo setup screen as shown below:
That’s all you need to do to install Odoo on CentOS 8. I hope you find this quick tip helpful. For further reading on Odoo 14, please refer to their official knowledge base. If you have questions or suggestions, feel free to leave a comment below.