In this article, we will show you how to install Odoo 13 on a CentOS 8 VPS.
In recent years, Odoo has grown into one of the most popular and robust business management platforms that you can find. The range of business applications that can be installed in one place makes Odoo so popular and beloved all over the world.
Among the most used modules for Odoo are Point of Sale (POS), Inventory, CRM, VoIP, Website, Live Chat, e-Commerce, manufacturing, billing, accounting, warehouse, project management, inventory, Forum, Android & iPhone Apps, eCommerce, and much more. That long list of apps directly shows just how versatile and conforming this platform really is – it really can do almost anything you need it to in order to run and manage your business. The install process is straightforward and easy, so let’s get started right away.
Odoo is known as a resource-intensive application, so our recommendation is to start with our SSD 2 VPS hosting plan or higher.
Table of Contents
Step 1: Connect to Your Server
Before we begin, you need to connect to your server via SSH as the root user. To do this, use the following command:
ssh [email protected]server_IP_address -p Port_number
of course, you will need to replace
Port_number with your actual server IP address and SSH port number.
Step 2: Update the System
We will update the server with the command:
Once this is complete, the EPEL repository can be installed by typing:
dnf install epel-release
Step 3: Install Python packages and Odoo Dependencies
Firstly, we will install Python 3 by executing the following command:
dnf install python36 python36-devel
With the following command, we will install all the tools and dependencies we need to build the latest Odoo 13.
dnf install git gcc wget nodejs libxslt-devel bzip2-devel openldap-devel libjpeg-devel freetype-devel
Step 4: Create an Odoo User
With the following command, 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
useradd -m -U -r -d /opt/odoo -s /bin/bash odoo
You can name the user whatever you prefer, just do not forget to create a PostgreSQL user with the same name.
Step 5: Install and Configure PostgreSQL
Install PostgreSQL by executing:
dnf install postgresql postgresql-server postgresql-contrib
Then initialize the database:
Once that’s done, we can start the PostgreSQL process and enable it to start on boot:
systemctl start postgresql systemctl enable postgresql
Now, we’re going to create a new PostgreSQL user with the same name as the Odoo user system we created earlier in this tutorial.
su - postgres -c "createuser -s odoo"
Step 6: Install Wkhtmltopdf
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. We will install version 0.12.5, which is the latest version at the time this tutorial was written. The wkhtmltopdf package is not available in the official CentOS 8 repositories, so we will download and install it with the following commands:
cd /opt/ && wget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox-0.12.5-1.centos7.x86_64.rpm dnf localinstall wkhtmltox-0.12.5-1.centos7.x86_64.rpm
Step 7: Install and Configure Odoo 13
In this step, we will clone the branch of Odoo 13.0 to the server and use a virtualenv that will create an isolated Python environment for the Odoo 13 instance. But first, we will switch to the Odoo user which we created in the previous steps.
su - odoo
To clone Odoo from the GitHub repository, we will use the git clone command:
git clone https://www.github.com/odoo/odoo --depth 1 --branch 13.0 /opt/odoo/odoo13
With the command below we will create a new virtual environment that we will use for the new Odoo 13 instance.
cd /opt/odoo && python3 -m venv odoo13-venv
Once the virtual environment is created, we can activate it with this next 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 odoo13/requirements.txt
When the installation of the Python modules is complete, we can deactivate the virtual environment and return to the root user by using these commands:
deactivate && exit
The following few commands are optional and can be used if you want to use custom modules for the Odoo instance. The best practice is to install custom Odoo modules in a separated directory. Therefore we will create a new directory for the custom modules and change its ownership to the ‘odoo’ user.
mkdir /opt/odoo/odoo13-custom-addons chown odoo: /opt/odoo/odoo13-custom-addons
The following commands will create a log file for the new Odoo installation and change its ownership to the “odoo” user:
mkdir /var/log/odoo13 && touch /var/log/odoo13/odoo.log chown -R odoo: /var/log/odoo13/
The next step is to create a configuration file for the new Odoo instance.
You can use your preferred text editor to create the configuration file. Paste the following lines into the file:
[options] ; This is the password that allows database operations: admin_passwd = master_password db_host = False db_port = False db_user = odoo db_password = False xmlrpc_port = 8069 ; longpolling_port = 8072 logfile = /var/log/odoo13/odoo.log logrotate = True addons_path = /opt/odoo/odoo13/addons,/opt/odoo/odoo13-custom-addons
Please do not forget to change the
master_password with a new strong password. You can generate a strong password through the command line. Save and close the file. This completes the installation of Odoo on our system.
Step 8: Create a systemd Unit File
Now that our Odoo installation is complete, we will create a service unit file so that we can run Odoo as a service. This allows us to run Odoo in the background as a service as well as manage it, just like most other processes on the server.
Create a new
Once the file is open, paste the configuration below:
[Unit] Description=Odoo13 #Requires=postgresql-10.6.service #After=network.target postgresql-10.6.service [Service] Type=simple SyslogIdentifier=odoo13 PermissionsStartOnly=true User=odoo Group=odoo ExecStart=/opt/odoo/odoo13-venv/bin/python3 /opt/odoo/odoo13/odoo-bin -c /etc/odoo.conf StandardOutput=journal+console [Install] WantedBy=multi-user.target
Once the file is saved and closed, we will reload the daemon so it can acknowledge the newly created unit in systemd.
Finally, we can use the following commands to start and enable on boot our new Odoo instance:
systemctl start odoo13 systemctl enable odoo13
We can run the status command so that we can check if the new Odoo instance is active and running:
systemctl status odoo13.service
● odoo13.service - Odoo13 Loaded: loaded (/etc/systemd/system/odoo13.service; disabled; vendor preset: disabled) Active: active (running) since Wed 2019-10-30 14:22:16 EDT; 1min ago Main PID: 12909 (python3) Tasks: 6 (limit: 11543) Memory: 72.2M CGroup: /system.slice/odoo13.service └─12909 /opt/odoo/odoo13-venv/bin/python3 /opt/odoo/odoo13/odoo-bin -c /etc/odoo.conf
Step 9: Access the Odoo Instance
Now that we know that the fresh Odoo installation is active and running on the server, we can access it by navigating to our server IP address along with the Odoo port number. In this case, our installed Odoo uses the default port 8069.
If the installation has been successfully completed, you will be able to see the Odoo setup screen as shown below:
Congratulations, if you carefully followed our instructions in this tutorial, you will have successfully installed the latest Odoo 13 on your CentOS 8 VPS. You can create your first database and start using the lastest Odoo 13.