Learn how to install Odoo 13 on CentOS 7 with our detailed step-by-step guide. Set up and configure Odoo for efficient business management and operations. #centlinux #linux #odoo
Table of Contents
What is Odoo?
Odoo is an all-in-one software bundle, which contains CRM, website, e-commerce, billing, inventory, accounting, manufacturing and project management. It is available in Commercial and Community editions. Community Edition is open source and it is distributed under GNU GPLv3 license.
Odoo project was started in Feb 2005 and it was initially named Tiny ERP. Later in April 2009 the project name was changed to OpenERP and finally it becomes Odoo (On-Demand Open Object) in Sep 2014.
In this article, we will install Odoo 13 on CentOS 7.
Read Also:
Odoo 13 Server Requirements
Odoo 13 server requires following software packages.
- PostgreSQL (10 or later)
- wkhtmltopdf
- Python (3.6 or later)
Hardware requirements may vary according to your specific module usage and workload.
Recommended Training for You: Odoo (Open ERP) Basics
Environment Specification
We have configured a CentOS 7 minimal installed virtual machine for this tutorial.
- CPU – 3.4 Ghz (2 cores)
- Memory – 2 GB
- Storage – 20 GB
- Operating System – CentOS 7.7
- Hostname – odoo-server-01.recipes.com
- IP Address – 192.168.116.213 /24
Install PostgreSQL on CentOS 7
Connect to odoo-server-01.recipes.com as root user using ssh.
PostgreSQL 9.2 is available in default yum repositories. But Odoo requires the latest version of PostgreSQL.
Therefore, You can follow our previous post Install PostgreSQL on CentOS 7.
Install wkhtmltopdf on CentOS 7
wkhtmltopdf is a free and open source command line tool to render HTML into PDF format. wkhtmltopdf runs completely headless and does not requires a display or display service.
We can download wkhtmltopdf RPM from their official download page. We can also download source code of wkhtmltopdf from GitHub.
We are downloading the required RPM package from wkhtmltopdf official download page.
# cd /tmp # wget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox-0.12.5-1.centos7.x86_64.rpm --2019-12-05 19:05:09-- https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox-0.12.5-1.centos7.x86_64.rpm Resolving downloads.wkhtmltopdf.org (downloads.wkhtmltopdf.org)... 107.174.217.167 Connecting to downloads.wkhtmltopdf.org (downloads.wkhtmltopdf.org)|107.174.217.167|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 14072028 (13M) [application/octet-stream] Saving to: âwkhtmltox-0.12.5-1.centos7.x86_64.rpmâ 100%[======================================>] 14,072,028 257KB/s in 57s 2019-12-05 19:06:13 (242 KB/s) - âwkhtmltox-0.12.5-1.centos7.x86_64.rpmâ saved [14072028/14072028]
Install downloaded wkhtmltopdf package using yum command.
# yum install -y wkhtmltox-0.12.5-1.centos7.x86_64.rpm
wkhtmltopdf has been installed on CentOS 7.
Install Odoo 13 Prerequisites
Odoo requires some Python libraries that are available in Extra Packages for Enterprise Linux (EPEL) and IUS Community yum repositories. Therefore, we have to install these yum repositories.
Install IUS Community yum repository as follows.
# yum install https://centos7.iuscommunity.org/ius-release.rpm -y
Build yum cache for newly installed repositories.
# yum makecache fast Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile epel/x86_64/metalink | 7.9 kB 00:00 * base: mirrors.ges.net.pk * epel: epel.mirror.angkasa.id * extras: mirrors.ges.net.pk * updates: mirrors.ges.net.pk base | 3.6 kB 00:00 extras | 2.9 kB 00:00 ius | 1.3 kB 00:00 pgdg11 | 3.6 kB 00:00 pgdg12 | 3.6 kB 00:00 updates | 2.9 kB 00:00 Metadata Cache Created
Odoo 13 requires Python 3.6 or later, therefore, we are installing Python 3.6 and other relevant packages using yum command.
# yum -y install python36u python36u-devel python36-pillow python36-lxml npm nodejs libxml2-devel libjpeg-devel libxml2 libxslt libxslt-devel libpng libjpeg openssl icu libX11 libXext libXrender xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi python3-pip python3-setuptools git openldap-devel
Install Development Tools group using yum command.
# yum groupinstall 'Development Tools' -y
Install Nodejs packages as required by Odoo 13 server.
# npm install -g less less-plugin-clean-css -y
Create Users and Directories for Odoo Software
Create a PostgreSQL database user for Odoo.
# su - postgres -c "createuser -s odoo"
Create an Linux user to own CRM software and processes.
# adduser --system --home-dir=/opt/odoo --shell=/bin/bash -m odoo
Create directories as required by Odoo.
# mkdir /etc/odoo # mkdir /var/log/odoo/
Adjust ownership of these directories.
# chown -R odoo:odoo /opt/odoo/ # chown -R odoo:odoo /var/log/odoo/
Install Odoo 13 on CentOS 7
Download the latest source of Odoo from Github using git command.
# git clone --depth=1 https://github.com/odoo/odoo.git /opt/odoo/odoo Cloning into '/opt/odoo/odoo'... remote: Enumerating objects: 26830, done. remote: Counting objects: 100% (26830/26830), done. remote: Compressing objects: 100% (22141/22141), done. remote: Total 26830 (delta 7800), reused 12110 (delta 3826), pack-reused 0 Receiving objects: 100% (26830/26830), 114.21 MiB | 201.00 KiB/s, done. Resolving deltas: 100% (7800/7800), done. Checking out files: 100% (23948/23948), done.
Odoo source contains a file requirements.txt that contains list of required Python libraries. We can easily install all required Python libraries as follows.
# pip3.6 install -r /opt/odoo/odoo/requirements.txt
Start Odoo CRM and create config file.
# su - odoo -c "/opt/odoo/odoo/odoo-bin --addons-path=/opt/odoo/odoo/addons -s --stop-after-init" 2019-12-05 15:57:57,210 39135 INFO ? odoo: Odoo version 13.0 2019-12-05 15:57:57,210 39135 INFO ? odoo: Using configuration file at /opt/odoo/.odoorc 2019-12-05 15:57:57,210 39135 INFO ? odoo: addons paths: ['/opt/odoo/odoo/odoo/addons', '/opt/odoo/.local/share/Odoo/addons/13.0', '/opt/odoo/odoo/addons'] 2019-12-05 15:57:57,211 39135 INFO ? odoo: database: default@default:default 2019-12-05 15:57:57,799 39135 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf 2019-12-05 15:57:59,301 39135 INFO ? odoo.service.server: Initiating shutdown 2019-12-05 15:57:59,301 39135 INFO ? odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown.
Move config file to /etc/odoo directory.
# mv /opt/odoo/.odoorc /etc/odoo/odoo.conf
Set location of Odoo logfile in config file.
# sed -i "s,^(logfile = ).*,1"/var/log/odoo/odoo-server.log"," /etc/odoo/odoo.conf
Create symbolic link for Odoo executable.
# ln -s /opt/odoo/odoo/odoo-bin /usr/bin/odoo
A predefined systemd service is provided with Odoo source, therefore, we can use it to create Odoo service on CentOS 7.
# cp /opt/odoo/odoo/debian/odoo.service /usr/lib/systemd/system/
Enable and start Odoo service.
# systemctl enable --now odoo.service Created symlink from /etc/systemd/system/multi-user.target.wants/odoo.service to /usr/lib/systemd/system/odoo.service.
Configure CentOS 7 firewall to allow Odoo default port 8069/tcp. Optionally you can configure a Reverse Proxy using Varnish Cache to route users via default HTTP port 80/tcp.
# firewall-cmd --permanent --add-port=8069/tcp success # firewall-cmd --reload success
Verify Odoo version.
# odoo --version Running as user 'root' is a security risk. Odoo Server 13.0
Open URL http://odoo-server-01.recipes.com:8069/ in a web browser.
Create a database for Odoo as per the above screenshot.
We are reached at the Odoo dashboard.
Conclusion:
In this guide, you have learned how to install Odoo 13 on CentOS 7. Additionally, to perform various configurations on Odoo server the Odoo 12 Development Cookbook (PAID LINK) by Packt Publishing may be helpful for you, it provides more than 190 unique recipes to build effective enterprise and business applications.