In this tutorial, we will show you how to install Odoo on CentOS 8. For those of you who didn’t know, Odoo is one of the most popular and most powerful Open Source ERP business software based on the Python programming language. It is a web-based fully-featured application and comes with Open Source CRM, Point of Sales, Human Resource Management, Point of Sales, Billing and Accounting, Event Management, Email Marketing, Order Tracking etc. This application is helpful to maintain ERP in any business.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you through the step by step installation Odoo on a CentOS 8 server.
Install Odoo on CentOS 8
Step 1. First, let’s start by ensuring your system is up-to-date.
Step 2. Installing Dependencies.
Install Python 3, Git, and all the libraries and tools required to build Odoo from source:
We will create a new system user and group that we need to run the Odoo service. The home directory we will define in the /opt/odoo13 directory:
PostgreSQL is available in the default repositories. Now, Install PostgreSQL packages using following command:
Once the installation is complete, the PostgreSQL installation will not be enabled for automatic start or have the database initialized automatically. To make your database installation complete, you need to perform the following steps:
Start the PostgreSQL service and enable it to start on boot:
You can verify the installation using below command:
Odoo requires the wkhtmltopdf package, which is an open-source tool that converts the HTML format to PDF so that Odoo can print PDF reports:
First, start by cloning the Odoo source code from the Odoo GitHub repository:
gitclonehttps://www.github.com/odoo/odoo --depth 1 --branch 13.0 /opt/odoo13/odoo
Next, create a new Python virtual environment for the Odoo installation:
Once the virtual environment is created, we can activate it with this next command:
Then, install the required Python modules:
Once the installation is complete, deactivate the environment:
We will create a new directory for the custom modules and change its ownership to the ‘odoo’ user:
The next step is to create a configuration file for the new Odoo instance:
Step 7. Create a systemd Unit File.
We will create a service unit file so that we can run Odoo as a service, open your text editor and create a file named odoo13.service inside the /etc/systemd/system/ directory:
Add the following content:
Once the file is saved and closed, we will reload the daemon:
Modify the firewall rules to allow visitors to access Odoo using PostgreSQL’s default communicating port 8069:
Odoo will be available on HTTP port 8069 by default. Open your favourite browser and navigate to http://yourdomain.com:8069 or http://<your_server_IP_address>:8069.
Congratulations! You have successfully installed Odoo. Thanks for using this tutorial for installing Odoo open source ERP and CRM on your CentOS 8 system. For additional help or useful information, we recommend you to check the official Odoo website.