Set up Odoo 11 on CentOS 7

Odoo is the preferred all-in-one enterprise software program on the planet. It affords a variety of enterprise purposes together with CRM, web site, e-Commerce, billing, accounting, manufacturing, warehouse, challenge administration, stock and way more, all seamlessly built-in.

Odoo 11 requires Python 3.5 which isn’t out there within the CentOS repositories. Due to that, we can not set up the Odoo package deal by way of yum from the Odoo repository.

We both run Odoo in a docker container or set up it in a Python digital surroundings.

On this tutorial, we’ll stroll you thru methods to set up Odoo 11 utilizing Git supply and Python digital surroundings on a CentOS 7 machine.

Earlier than you start #

Log in to you CentOS machine as a sudo consumer and replace the system to the newest packages:

sudo yum replace

Allow the EPEL repository by typing:

sudo yum set up epel-release

We are going to set up Python 3.5 packages from the Software program Collections (SCL) repository.

By enabling SCL you’ll achieve entry to the newer variations of programming languages and providers which aren’t out there within the core repositories. Allow the SCL repository with the next command:

sudo yum set up centos-release-scl

Set up Python 3.5 packages, with the next command:

sudo yum set up rh-python35

Lastly set up git, pip and all of the instruments required to construct Odoo dependencies:

sudo yum set up git gcc wget nodejs-less libxslt-devel bzip2-devel openldap-devel libjpeg-devel freetype-devel postgresql-devel

Create Odoo consumer #

Create a brand new system consumer and group with residence listing /choose/odoo that may run the Odoo service:

sudo useradd -m -U -r -d /choose/odoo -s /bin/bash odoo

You’ll be able to title the consumer no matter you want, simply be sure you create a PostgreSQL consumer with the identical title.

Set up and configure PostgreSQL #

Set up the PostgreSQL server and create a brand new PostgreSQL database cluster:

sudo yum set up postgresql-serversudo postgresql-setup initdb

As soon as the set up is accomplished, allow and begin the PostgreSQL service:

sudo systemctl allow postgresqlsudo systemctl begin postgresql

Create a PostgreSQL consumer with the identical title because the beforehand created system consumer, in our case odoo:

sudo su – postgres -c “createuser -s odoo”

Set up Wkhtmltopdf #

The wkhtmltox package deal supplies a set of open-source command line instruments which may render HTML into PDF and varied picture codecs. With a purpose to print PDF reviews, you will want the wkhtmltopdf software. The advisable model for Odoo is 0.12.1 which isn’t out there within the official CentOS 7 repositories.

To obtain and set up the advisable model run the next instructions:

wget yum localinstall wkhtmltox-0.12.1_linux-centos7-amd64.rpm

Set up and configure Odoo 11 #

We are going to set up Odoo from the GitHub repository so we are able to have extra management over variations and updates. We may also use virtualenv which is a software to create remoted Python environments.

Earlier than beginning with the set up course of, be sure you [switch to the user] “odoo”:

sudo su – odoo

To substantiate that you’re logged-in as odoo consumer you should use the next command:


Now we are able to begin with the set up course of, first clone the odoo from the GitHub repository:

git clone –depth 1 –branch 11.0 /choose/odoo/odoo11

Allow software program collections so we are able to entry the python 3.5 binaries:

scl allow rh-python35 bash

Create a brand new digital surroundings for our Odoo set up with:

cd /choose/odoopython3 -m venv odoo11-venv

activate the surroundings:

supply odoo11-venv/bin/activate

and set up all required Python modules:

pip3 set up -r odoo11/necessities.txt

Should you encounter any compilation errors throughout the set up, just remember to put in all the required dependencies listed within the Earlier than you start part.

As soon as the set up is accomplished deactivate the surroundings and swap again to your sudo consumer utilizing the next instructions:


Should you plan to put in {custom} modules it’s best to put in these modules in a separate listing. To create a brand new listing for the {custom} modules run:

sudo mkdir /choose/odoo/odoo11-custom-addonssudo chown odoo: /choose/odoo/odoo11-custom-addons

Subsequent, we have to create a configuration file:

/and so on/odoo11.conf

; That is the password that enables database operations:
admin_passwd = superadmin_passwd
db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = /choose/odoo/odoo11/addons
; If you’re utilizing {custom} modules
; addons_path = /choose/odoo/odoo11/addons,/choose/odoo/odoo11-custom-addons

Don’t forget to vary the superadmin_passwd to one thing safer and modify the addons_path should you’re utilizing {custom} modules.

Create a systemd unit file #

To run odoo as a service we are going to create a odoo11.service unit file within the /and so on/systemd/system/ listing with the next contents:

/and so on/systemd/system/odoo11.service

After=community.goal postgresql.service

ExecStart=/usr/bin/scl allow rh-python35 — /choose/odoo/odoo11-venv/bin/python3 /choose/odoo/odoo11/odoo-bin -c /and so on/odoo11.conf


Notify systemd that we now have created a brand new unit file and begin the Odoo service by executing:

sudo systemctl daemon-reloadsudo systemctl begin odoo11

You’ll be able to examine the service standing with the next command:

sudo systemctl standing odoo11● odoo11.service – Odoo11
Loaded: loaded (/and so on/systemd/system/odoo11.service; disabled; vendor preset: disabled)
Lively: energetic (working) since Wed 2018-03-28 20:13:30 UTC; 6s in the past
Principal PID: 16174 (scl)
CGroup: /system.slice/odoo11.service
├─16174 /usr/bin/scl allow rh-python35 — /choose/odoo/odoo11-venv/bin/python3 /choose/odoo/odoo11/odoo-bin -c /and so on/odoo11.conf
├─16175 /bin/bash /var/tmp/sclihoNjg
└─16178 /choose/odoo/odoo11-venv/bin/python3 /choose/odoo/odoo11/odoo-bin -c /and so on/odoo11.conf

and if there are not any errors you’ll be able to allow the Odoo service to be robotically began at boot time:

sudo systemctl allow odoo11

If you wish to see the messages logged by the Odoo service you should use the command beneath:

sudo journalctl -u odoo11

Take a look at the Set up #

Open your browser and sort: http://<your_domain_or_IP_address>:8069

Assuming the set up is profitable, a display much like the next will seem:

Should you can’t entry the web page then most likely your firewall is obstructing port 8069.

Conclusion #

This tutorial walked you thru the set up of Odoo 11 on CentOS 7 in a Python digital surroundings.

You might also need to examine our tutorial about methods to create automated each day backups of your Odoo databases.

Should you hit an issue or have suggestions, depart a remark beneath.


Germany Devoted Server

Leave a Reply