Install Odoo 13 Server on CentOS 7 - CentLinux


Saturday, 7 December 2019

Install Odoo 13 Server on CentOS 7

Install Odoo 13 Server on CentOS 7

Odoo is an all-in-one software bundle, which contains CRM, website, e-commerce, billing, inventory, accounting, manufacturing and project management. Odoo is available in Commercial and Community editions. Odoo 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 are installing Odoo 13 Server on CentOS 7.


This Article Provides:


    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.


    Environment Specification:

    We have configured a CentOS 7 virtual machine for this tutorial.

    • CPU - 3.4 Ghz (2 cores)
    • Memory - 2 GB
    • Storage - 20 GB
    • Operating System - CentOS 7.7
    • Hostname -
    • IP Address - /24


    Installing PostgreSQL database on CentOS 7:

    Connect to 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 and pgAdmin on CentOS 7.


    Installing 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.

    [root@odoo-server-01 ~]# cd /tmp [root@odoo-server-01 tmp]# wget --2019-12-05 19:05:09-- Resolving ( Connecting to (||:443... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: [following] --2019-12-05 19:05:12-- Resolving ( Connecting to (||:443... connected. HTTP request sent, awaiting response... 302 Found Location: [following] --2019-12-05 19:05:15-- Resolving ( Connecting to (||: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.

    [root@odoo-server-01 tmp]# yum install -y wkhtmltox-0.12.5-1.centos7.x86_64.rpm Loaded plugins: fastestmirror Examining wkhtmltox-0.12.5-1.centos7.x86_64.rpm: 1:wkhtmltox-0.12.5-1.centos7.x86_64 Marking wkhtmltox-0.12.5-1.centos7.x86_64.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package wkhtmltox.x86_64 1:0.12.5-1.centos7 will be installed --> Processing Dependency: fontconfig for package: 1:wkhtmltox-0.12.5-1.centos7.x86_64 Loading mirror speeds from cached hostfile * base: * extras: * updates: --> Processing Dependency: libX11 for package: 1:wkhtmltox-0.12.5-1.centos7.x86_64 --> Processing Dependency: libXext for package: 1:wkhtmltox-0.12.5-1.centos7.x86_64 --> Processing Dependency: libXrender for package: 1:wkhtmltox-0.12.5-1.centos7.x86_64 --> Processing Dependency: libjpeg for package: 1:wkhtmltox-0.12.5-1.centos7.x86_64 --> Processing Dependency: xorg-x11-fonts-75dpi for package: 1:wkhtmltox-0.12.5-1.centos7.x86_64 --> Processing Dependency: xorg-x11-fonts-Type1 for package: 1:wkhtmltox-0.12.5-1.centos7.x86_64 --> Running transaction check ---> Package fontconfig.x86_64 0:2.13.0-4.3.el7 will be installed --> Processing Dependency: fontpackages-filesystem for package: fontconfig-2.13.0-4.3.el7.x86_64 --> Processing Dependency: dejavu-sans-fonts for package: fontconfig-2.13.0-4.3.el7.x86_64 ---> Package libX11.x86_64 0:1.6.7-2.el7 will be installed --> Processing Dependency: libX11-common >= 1.6.7-2.el7 for package: libX11-1.6.7-2.el7.x86_64 --> Processing Dependency: for package: libX11-1.6.7-2.el7.x86_64 ---> Package libXext.x86_64 0:1.3.3-3.el7 will be installed ---> Package libXrender.x86_64 0:0.9.10-1.el7 will be installed ---> Package libjpeg-turbo.x86_64 0:1.2.90-8.el7 will be installed ---> Package xorg-x11-fonts-75dpi.noarch 0:7.5-9.el7 will be installed --> Processing Dependency: mkfontdir for package: xorg-x11-fonts-75dpi-7.5-9.el7.noarch --> Processing Dependency: mkfontdir for package: xorg-x11-fonts-75dpi-7.5-9.el7.noarch ---> Package xorg-x11-fonts-Type1.noarch 0:7.5-9.el7 will be installed --> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.5-9.el7.noarch --> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.5-9.el7.noarch --> Running transaction check ---> Package dejavu-sans-fonts.noarch 0:2.33-6.el7 will be installed --> Processing Dependency: dejavu-fonts-common = 2.33-6.el7 for package: dejavu-sans-fonts-2.33-6.el7.noarch ---> Package fontpackages-filesystem.noarch 0:1.44-8.el7 will be installed ---> Package libX11-common.noarch 0:1.6.7-2.el7 will be installed ---> Package libxcb.x86_64 0:1.13-1.el7 will be installed --> Processing Dependency: for package: libxcb-1.13-1.el7.x86_64 ---> Package ttmkfdir.x86_64 0:3.0.9-42.el7 will be installed ---> Package xorg-x11-font-utils.x86_64 1:7.5-21.el7 will be installed --> Processing Dependency: for package: 1:xorg-x11-font-utils-7.5-21.el7.x86_64 --> Running transaction check ---> Package dejavu-fonts-common.noarch 0:2.33-6.el7 will be installed ---> Package libXau.x86_64 0:1.0.8-2.1.el7 will be installed ---> Package libfontenc.x86_64 0:1.1.3-3.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: wkhtmltox x86_64 1:0.12.5-1.centos7 /wkhtmltox-0.12.5-1.centos7.x86_64 113 M Installing for dependencies: dejavu-fonts-common noarch 2.33-6.el7 base 64 k dejavu-sans-fonts noarch 2.33-6.el7 base 1.4 M fontconfig x86_64 2.13.0-4.3.el7 base 254 k fontpackages-filesystem noarch 1.44-8.el7 base 9.9 k libX11 x86_64 1.6.7-2.el7 base 607 k libX11-common noarch 1.6.7-2.el7 base 164 k libXau x86_64 1.0.8-2.1.el7 base 29 k libXext x86_64 1.3.3-3.el7 base 39 k libXrender x86_64 0.9.10-1.el7 base 26 k libfontenc x86_64 1.1.3-3.el7 base 31 k libjpeg-turbo x86_64 1.2.90-8.el7 base 135 k libxcb x86_64 1.13-1.el7 base 214 k ttmkfdir x86_64 3.0.9-42.el7 base 48 k xorg-x11-font-utils x86_64 1:7.5-21.el7 base 104 k xorg-x11-fonts-75dpi noarch 7.5-9.el7 base 2.8 M xorg-x11-fonts-Type1 noarch 7.5-9.el7 base 521 k Transaction Summary ================================================================================ Install 1 Package (+16 Dependent packages) Total size: 120 M Total download size: 6.4 M Installed size: 128 M Downloading packages: (1/16): dejavu-fonts-common-2.33-6.el7.noarch.rpm | 64 kB 00:02 (2/16): fontpackages-filesystem-1.44-8.el7.noarch.rpm | 9.9 kB 00:03 (3/16): libX11-common-1.6.7-2.el7.noarch.rpm | 164 kB 00:02 (4/16): fontconfig-2.13.0-4.3.el7.x86_64.rpm | 254 kB 00:05 (5/16): libXext-1.3.3-3.el7.x86_64.rpm | 39 kB 00:00 (6/16): libfontenc-1.1.3-3.el7.x86_64.rpm | 31 kB 00:00 (7/16): libjpeg-turbo-1.2.90-8.el7.x86_64.rpm | 135 kB 00:03 (8/16): libXrender-0.9.10-1.el7.x86_64.rpm | 26 kB 00:05 (9/16): dejavu-sans-fonts-2.33-6.el7.noarch.rpm | 1.4 MB 00:13 (10/16): libX11-1.6.7-2.el7.x86_64.rpm | 607 kB 00:14 (11/16): libXau-1.0.8-2.1.el7.x86_64.rpm | 29 kB 00:10 (12/16): libxcb-1.13-1.el7.x86_64.rpm | 214 kB 00:04 (13/16): xorg-x11-font-utils-7.5-21.el7.x86_64.rpm | 104 kB 00:05 (14/16): ttmkfdir-3.0.9-42.el7.x86_64.rpm | 48 kB 00:15 (15/16): xorg-x11-fonts-Type1-7.5-9.el7.noarch.rpm | 521 kB 00:13 (16/16): xorg-x11-fonts-75dpi-7.5-9.el7.noarch.rpm | 2.8 MB 00:46 -------------------------------------------------------------------------------- Total 107 kB/s | 6.4 MB 01:01 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : fontpackages-filesystem-1.44-8.el7.noarch 1/17 Installing : dejavu-fonts-common-2.33-6.el7.noarch 2/17 Installing : dejavu-sans-fonts-2.33-6.el7.noarch 3/17 Installing : fontconfig-2.13.0-4.3.el7.x86_64 4/17 Installing : ttmkfdir-3.0.9-42.el7.x86_64 5/17 Installing : libfontenc-1.1.3-3.el7.x86_64 6/17 Installing : 1:xorg-x11-font-utils-7.5-21.el7.x86_64 7/17 Installing : xorg-x11-fonts-Type1-7.5-9.el7.noarch 8/17 Installing : xorg-x11-fonts-75dpi-7.5-9.el7.noarch 9/17 Installing : libX11-common-1.6.7-2.el7.noarch 10/17 Installing : libXau-1.0.8-2.1.el7.x86_64 11/17 Installing : libxcb-1.13-1.el7.x86_64 12/17 Installing : libX11-1.6.7-2.el7.x86_64 13/17 Installing : libXext-1.3.3-3.el7.x86_64 14/17 Installing : libXrender-0.9.10-1.el7.x86_64 15/17 Installing : libjpeg-turbo-1.2.90-8.el7.x86_64 16/17 Installing : 1:wkhtmltox-0.12.5-1.centos7.x86_64 17/17 Verifying : libXext-1.3.3-3.el7.x86_64 1/17 Verifying : libjpeg-turbo-1.2.90-8.el7.x86_64 2/17 Verifying : 1:xorg-x11-font-utils-7.5-21.el7.x86_64 3/17 Verifying : fontconfig-2.13.0-4.3.el7.x86_64 4/17 Verifying : dejavu-sans-fonts-2.33-6.el7.noarch 5/17 Verifying : 1:wkhtmltox-0.12.5-1.centos7.x86_64 6/17 Verifying : libXau-1.0.8-2.1.el7.x86_64 7/17 Verifying : libXrender-0.9.10-1.el7.x86_64 8/17 Verifying : dejavu-fonts-common-2.33-6.el7.noarch 9/17 Verifying : xorg-x11-fonts-Type1-7.5-9.el7.noarch 10/17 Verifying : libX11-1.6.7-2.el7.x86_64 11/17 Verifying : libX11-common-1.6.7-2.el7.noarch 12/17 Verifying : libxcb-1.13-1.el7.x86_64 13/17 Verifying : xorg-x11-fonts-75dpi-7.5-9.el7.noarch 14/17 Verifying : libfontenc-1.1.3-3.el7.x86_64 15/17 Verifying : fontpackages-filesystem-1.44-8.el7.noarch 16/17 Verifying : ttmkfdir-3.0.9-42.el7.x86_64 17/17 Installed: wkhtmltox.x86_64 1:0.12.5-1.centos7 Dependency Installed: dejavu-fonts-common.noarch 0:2.33-6.el7 dejavu-sans-fonts.noarch 0:2.33-6.el7 fontconfig.x86_64 0:2.13.0-4.3.el7 fontpackages-filesystem.noarch 0:1.44-8.el7 libX11.x86_64 0:1.6.7-2.el7 libX11-common.noarch 0:1.6.7-2.el7 libXau.x86_64 0:1.0.8-2.1.el7 libXext.x86_64 0:1.3.3-3.el7 libXrender.x86_64 0:0.9.10-1.el7 libfontenc.x86_64 0:1.1.3-3.el7 libjpeg-turbo.x86_64 0:1.2.90-8.el7 libxcb.x86_64 0:1.13-1.el7 ttmkfdir.x86_64 0:3.0.9-42.el7 xorg-x11-font-utils.x86_64 1:7.5-21.el7 xorg-x11-fonts-75dpi.noarch 0:7.5-9.el7 xorg-x11-fonts-Type1.noarch 0:7.5-9.el7 Complete!

    wkhtmltopdf has been installed on CentOS 7.


    Installing Odoo Prerequisites Packages on CentOS 7:

    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.

    [root@odoo-server-01 ~]# yum install -y Loaded plugins: fastestmirror ius-release.rpm | 8.2 kB 00:00 Examining /var/tmp/yum-root-3fdaDs/ius-release.rpm: ius-release-2-1.el7.ius.noarch Marking /var/tmp/yum-root-3fdaDs/ius-release.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package ius-release.noarch 0:2-1.el7.ius will be installed --> Processing Dependency: epel-release = 7 for package: ius-release-2-1.el7.ius.noarch Loading mirror speeds from cached hostfile * base: * centos-sclo-rh: * extras: * updates: --> Running transaction check ---> Package epel-release.noarch 0:7-11 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: ius-release noarch 2-1.el7.ius /ius-release 4.5 k Installing for dependencies: epel-release noarch 7-11 extras 15 k Transaction Summary ================================================================================ Install 1 Package (+1 Dependent package) Total size: 19 k Total download size: 15 k Installed size: 29 k Downloading packages: epel-release-7-11.noarch.rpm | 15 kB 00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : epel-release-7-11.noarch 1/2 Installing : ius-release-2-1.el7.ius.noarch 2/2 Verifying : ius-release-2-1.el7.ius.noarch 1/2 Verifying : epel-release-7-11.noarch 2/2 Installed: ius-release.noarch 0:2-1.el7.ius Dependency Installed: epel-release.noarch 0:7-11 Complete!

    Build yum cache for newly installed repositories.

    [root@odoo-server-01 ~]# yum makecache fast Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile epel/x86_64/metalink | 7.9 kB 00:00 * base: * epel: * extras: * updates: 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.

    [root@odoo-server-01 ~]# 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 ... Installed: python3.x86_64 0:3.6.8-10.el7 python3-devel.x86_64 0:3.6.8-10.el7 python3-pip.noarch 0:9.0.3-5.el7 python3-setuptools.noarch 0:39.2.0-10.el7 python36-lxml.x86_64 0:4.2.5-4.el7.ius python36-pillow.x86_64 0:6.0.0-2.el7 Dependency Installed: jbigkit-libs.x86_64 0:2.0-11.el7 lcms2.x86_64 0:2.6-3.el7 libtiff.x86_64 0:4.0.3-32.el7 libwebp.x86_64 0:0.3.0-7.el7 openjpeg2.x86_64 0:2.3.1-1.el7 python3-libs.x86_64 0:3.6.8-10.el7 python3-rpm-generators.noarch 0:6-2.el7 python36-olefile.noarch 0:0.46-2.el7 Complete!

    Install Development Tools group using yum command.

    [root@odoo-server-01 ~]# yum groupinstall 'Development Tools' -y ... Installed: autoconf.noarch 0:2.69-11.el7 automake.noarch 0:1.13.4-3.el7 bison.x86_64 0:3.0.4-2.el7 byacc.x86_64 0:1.9.20130304-3.el7 cscope.x86_64 0:15.8-10.el7 ctags.x86_64 0:5.8-13.el7 diffstat.x86_64 0:1.57-4.el7 doxygen.x86_64 1:1.8.5-3.el7 elfutils.x86_64 0:0.176-2.el7 flex.x86_64 0:2.5.37-6.el7 gcc.x86_64 0:4.8.5-39.el7 gcc-c++.x86_64 0:4.8.5-39.el7 gcc-gfortran.x86_64 0:4.8.5-39.el7 indent.x86_64 0:2.2.11-13.el7 intltool.noarch 0:0.50.2-7.el7 libtool.x86_64 0:2.4.2-22.el7_3 patch.x86_64 0:2.7.1-12.el7_7 patchutils.x86_64 0:0.3.3-4.el7 rcs.x86_64 0:5.9.0-5.el7 rpm-build.x86_64 0:4.11.3-40.el7 rpm-sign.x86_64 0:4.11.3-40.el7 subversion.x86_64 0:1.7.14-14.el7 swig.x86_64 0:2.0.10-5.el7 systemtap.x86_64 0:4.0-10.el7_7 Dependency Installed: apr.x86_64 0:1.4.8-5.el7 apr-util.x86_64 0:1.5.2-6.el7 avahi-libs.x86_64 0:0.6.31-19.el7 boost-date-time.x86_64 0:1.53.0-27.el7 boost-system.x86_64 0:1.53.0-27.el7 boost-thread.x86_64 0:1.53.0-27.el7 bzip2.x86_64 0:1.0.6-13.el7 cpp.x86_64 0:4.8.5-39.el7 dyninst.x86_64 0:9.3.1-3.el7 efivar-libs.x86_64 0:36-12.el7 emacs-filesystem.noarch 1:24.3-22.el7 gdb.x86_64 0:7.6.1-115.el7 gettext-common-devel.noarch 0: gettext-devel.x86_64 0: glibc-devel.x86_64 0:2.17-292.el7 glibc-headers.x86_64 0:2.17-292.el7 gnutls.x86_64 0:3.3.29-9.el7_6 kernel-debug-devel.x86_64 0:3.10.0-1062.7.1.el7 kernel-headers.x86_64 0:3.10.0-1062.7.1.el7 libdwarf.x86_64 0:20130207-4.el7 libgfortran.x86_64 0:4.8.5-39.el7 libmodman.x86_64 0:2.0.1-8.el7 libmpc.x86_64 0:1.0.1-3.el7 libproxy.x86_64 0:0.4.11-11.el7 libquadmath.x86_64 0:4.8.5-39.el7 libquadmath-devel.x86_64 0:4.8.5-39.el7 libstdc++-devel.x86_64 0:4.8.5-39.el7 m4.x86_64 0:1.4.16-10.el7 mokutil.x86_64 0:15-2.el7.centos mpfr.x86_64 0:3.1.1-4.el7 neon.x86_64 0:0.30.0-4.el7 nettle.x86_64 0:2.7.1-8.el7 pakchois.x86_64 0:0.4-10.el7 perl-Data-Dumper.x86_64 0:2.145-3.el7 perl-Test-Harness.noarch 0:3.28-3.el7 perl-Thread-Queue.noarch 0:3.02-2.el7 perl-XML-Parser.x86_64 0:2.41-10.el7 subversion-libs.x86_64 0:1.7.14-14.el7 systemtap-client.x86_64 0:4.0-10.el7_7 systemtap-devel.x86_64 0:4.0-10.el7_7 systemtap-runtime.x86_64 0:4.0-10.el7_7 trousers.x86_64 0:0.3.14-2.el7 unzip.x86_64 0:6.0-20.el7 Complete!

    Install Nodejs packages as required by Odoo 13 server.

    [root@odoo-server-01 ~]# npm install -g less less-plugin-clean-css -y /usr/bin/lessc -> /usr/lib/node_modules/less/bin/lessc /usr/lib ââ⬠less@3.10.3 â âââ clone@2.1.2 â ââ⬠errno@0.1.7 â â âââ prr@1.0.1 â âââ graceful-fs@4.2.3 â âââ image-size@0.5.5 â âââ mime@1.6.0 â ââ⬠mkdirp@0.5.1 â â âââ minimist@0.0.8 â ââ⬠promise@7.3.1 â â âââ asap@2.0.6 â ââ⬠request@2.88.0 â â âââ aws-sign2@0.7.0 â â âââ aws4@1.9.0 â â âââ caseless@0.12.0 â â ââ⬠combined-stream@1.0.8 â â â âââ delayed-stream@1.0.0 â â âââ extend@3.0.2 â â âââ forever-agent@0.6.1 â â ââ⬠form-data@2.3.3 â â â âââ asynckit@0.4.0 â â ââ⬠har-validator@5.1.3 â â â ââ⬠ajv@6.10.2 â â â â âââ fast-deep-equal@2.0.1 â â â â âââ fast-json-stable-stringify@2.0.0 â â â â âââ json-schema-traverse@0.4.1 â â â â ââ⬠uri-js@4.2.2 â â â â âââ punycode@2.1.1 â â â âââ har-schema@2.0.0 â â ââ⬠http-signature@1.2.0 â â â âââ assert-plus@1.0.0 â â â ââ⬠jsprim@1.4.1 â â â â âââ extsprintf@1.3.0 â â â â âââ json-schema@0.2.3 â â â â ââ⬠verror@1.10.0 â â â â âââ core-util-is@1.0.2 â â â ââ⬠sshpk@1.16.1 â â â âââ asn1@0.2.4 â â â âââ bcrypt-pbkdf@1.0.2 â â â âââ dashdash@1.14.1 â â â âââ ecc-jsbn@0.1.2 â â â âââ getpass@0.1.7 â â â âââ jsbn@0.1.1 â â â âââ safer-buffer@2.1.2 â â â âââ tweetnacl@0.14.5 â â âââ is-typedarray@1.0.0 â â âââ isstream@0.1.2 â â âââ json-stringify-safe@5.0.1 â â ââ⬠mime-types@2.1.25 â â â âââ mime-db@1.42.0 â â âââ oauth-sign@0.9.0 â â âââ performance-now@2.1.0 â â âââ qs@6.5.2 â â âââ safe-buffer@5.2.0 â â ââ⬠tough-cookie@2.4.3 â â â âââ psl@1.5.0 â â â âââ punycode@1.4.1 â â âââ tunnel-agent@0.6.0 â â âââ uuid@3.3.3 â âââ source-map@0.6.1 ââ⬠less-plugin-clean-css@1.5.1 ââ⬠clean-css@3.4.28 ââ⬠commander@2.8.1 â âââ graceful-readlink@1.0.1 ââ⬠source-map@0.4.4 âââ amdefine@1.0.1


    Create Users and Directories for Odoo 13 Server:

    Create a PostgreSQL database user for Odoo.

    [root@odoo-server-01 ~]# su - postgres -c "createuser -s odoo"

    Create an Linux user to own Odoo software and processes.

    [root@odoo-server-01 ~]# adduser --system --home-dir=/opt/odoo --shell=/bin/bash -m odoo

    Create directories as required by Odoo.

    [root@odoo-server-01 ~]# mkdir /etc/odoo [root@odoo-server-01 ~]# mkdir /var/log/odoo/

    Adjust ownership of these directories.

    [root@odoo-server-01 ~]# chown -R odoo:odoo /opt/odoo/ [root@odoo-server-01 ~]# chown -R odoo:odoo /var/log/odoo/


    Installing Odoo 13 Server on CentOS 7:

    Download the latest source of Odoo from Github using git command.

    [root@odoo-server-01 ~]# git clone --depth=1 /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.

    [root@odoo-server-01 ~]# pip3.6 install -r /opt/odoo/odoo/requirements.txt ... Running install for lxml ... done Running install for ebaysdk ... done Running install for feedparser ... done Running install for greenlet ... done Running install for gevent ... done Running install for html2text ... done Running install for MarkupSafe ... done Running install for Mako ... done Running install for ofxparse ... done Running install for psutil ... done Running install for pydot ... done Running install for pyldap ... done Running install for PyPDF2 ... done Running install for pyusb ... done Running install for reportlab ... done Running install for vatnumber ... done Running install for vobject ... done Successfully installed Jinja2-2.10.1 Mako-1.0.4 MarkupSafe-0.23 Pillow-5.4.1 PyPDF2-1.26.0 Werkzeug-0.14.1 XlsxWriter-0.9.3 appdirs-1.4.3 attrs-19.3.0 beautifulsoup4-4.8.1 cached-property-1.5.1 certifi-2019.11.28 defusedxml-0.6.0 ebaysdk-2.1.5 feedparser-5.2.1 gevent-1.1.2 greenlet-0.4.10 html2text-2016.9.19 idna-2.7 isodate-0.6.0 libsass-0.12.3 lxml-3.7.1 mock-2.0.0 num2words-0.5.6 ofxparse-0.16 passlib-1.6.5 pbr-5.4.4 polib-1.1.0 psutil-4.3.1 psycopg2- pydot-1.2.3 pyldap-2.4.28 pyparsing-2.1.10 pyserial-3.1.1 python-dateutil-2.5.3 python-stdnum-1.12 pyusb-1.0.0 qrcode-5.3 reportlab-3.3.0 requests-2.20.0 requests-toolbelt-0.9.1 six-1.13.0 soupsieve-1.9.5 urllib3-1.24.3 vatnumber-1.2 vobject-0.9.3 xlrd-1.0.0 xlwt-1.3.0 zeep-3.1.0

    Start Odoo and create config file.

    [root@odoo-server-01 ~]# 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.

    [root@odoo-server-01 ~]# mv /opt/odoo/.odoorc /etc/odoo/odoo.conf

    Set location of Odoo logfile in config file.

    [root@odoo-server-01 ~]# sed -i "s,^\(logfile = \).*,\1"/var/log/odoo/odoo-server.log"," /etc/odoo/odoo.conf

    Create symbolic link for Odoo executable.

    [root@odoo-server-01 ~]# 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.

    [root@odoo-server-01 ~]# cp /opt/odoo/odoo/debian/odoo.service /usr/lib/systemd/system/

    Enable and start Odoo service.

    [root@odoo-server-01 ~]# systemctl enable --now odoo.service Created symlink from /etc/systemd/system/ 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.

    [root@odoo-server-01 ~]# firewall-cmd --permanent --add-port=8069/tcp success [root@odoo-server-01 ~]# firewall-cmd --reload success

    Verify Odoo version.

    [root@odoo-server-01 ~]# odoo --version Running as user 'root' is a security risk. Odoo Server 13.0

    Browse URL in a web browser.


    Create a database for Odoo as per the above screenshot.


    We are reached at the Odoo dashboard.

    To perform various configurations on Odoo server the Odoo 12 Development Cookbook by Packt Publishing may be helpful for you, it provides more than 190 unique recipes to build effective enterprise and business applications.

    We have successfully installed Odoo 13 server on CentOS 7.

    No comments:

    Post a comment