Install Flectra ERP/CRM on CentOS 8 - CentLinux


Sunday, 18 October 2020

Install Flectra ERP/CRM on CentOS 8


Flectra is a open source ERP and CRM software. In this article, you will learn how to install Flectra ERP/CRM on CentOS 8.


Table of Contents:


    What is Flectra? :

    Flectra is the Open Source ERP and CRM system for your Business. Flectra is the next generation business information system helps you grow your business, with powerful modular design covering all essential aspects of a business.

    Flectra is a suite of web based open source business apps forked from Odoo. The main Flectra Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management and many more.

    Flectra is built using Python programming language and PostgreSQL database.


    Environment Specification:

    We are using a minimally installed CentOS 8 virtual machine with following specifications.

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


    Update Existing Software Packages in CentOS 8:

    By using a SSH client, log on to virtual machine as root user.

    It is a best practice to update existing software packages on your Linux server especially before installing a new software.

    Use the following Linux command to update existing software packages.

    [root@flectra-01 ~]# dnf update -y Last metadata expiration check: 0:22:15 ago on Mon 12 Oct 2020 09:30:17 PM PKT. Dependencies resolved. Nothing to do. Complete!

    Since, we frequently update our Linux server, therefore, there isn't update available right now.

    Verify the Linux Kernel version that is being used in this installation guide.

    [root@flectra-01 ~]# uname -r 4.18.0-193.19.1.el8_2.x86_64

    Verify the Linux operating system version that is being used in this installation guide.

    [root@flectra-01 ~]# cat /etc/redhat-release CentOS Linux release 8.2.2004 (Core)


    Installing PostgreSQL Server on CentOS 8:

    Flectra requires a PostgreSQL database as its data repository. Therefore, We are installing PostgreSQL and relevant software packages by using dnf command.

    [root@flectra-01 ~]# dnf install -y postgresql-server libpq-devel Last metadata expiration check: 0:35:14 ago on Mon 12 Oct 2020 09:30:17 PM PKT. Dependencies resolved. ================================================================================ Package Arch Version Repo Size ================================================================================ Installing: postgresql-server x86_64 10.14-1.module_el8.2.0+487+53cc39ce AppStream 5.0 M Installing dependencies: libpq x86_64 12.4-1.el8_2 AppStream 195 k postgresql x86_64 10.14-1.module_el8.2.0+487+53cc39ce AppStream 1.5 M Enabling module streams: postgresql 10 Transaction Summary ================================================================================ Install 3 Packages Total download size: 6.7 M Installed size: 26 M Downloading Packages: (1/3): libpq-12.4-1.el8_2.x86_64.rpm 36 kB/s | 195 kB 00:05 (2/3): postgresql-10.14-1.module_el8.2.0+487+53 53 kB/s | 1.5 MB 00:28 (3/3): postgresql-server-10.14-1.module_el8.2.0 80 kB/s | 5.0 MB 01:04 -------------------------------------------------------------------------------- Total 104 kB/s | 6.7 MB 01:06 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : libpq-12.4-1.el8_2.x86_64 1/3 Installing : postgresql-10.14-1.module_el8.2.0+487+53cc39ce.x86_6 2/3 Running scriptlet: postgresql-server-10.14-1.module_el8.2.0+487+53cc39c 3/3 Installing : postgresql-server-10.14-1.module_el8.2.0+487+53cc39c 3/3 Running scriptlet: postgresql-server-10.14-1.module_el8.2.0+487+53cc39c 3/3 Verifying : libpq-12.4-1.el8_2.x86_64 1/3 Verifying : postgresql-10.14-1.module_el8.2.0+487+53cc39ce.x86_6 2/3 Verifying : postgresql-server-10.14-1.module_el8.2.0+487+53cc39c 3/3 Installed: libpq-12.4-1.el8_2.x86_64 postgresql-10.14-1.module_el8.2.0+487+53cc39ce.x86_64 postgresql-server-10.14-1.module_el8.2.0+487+53cc39ce.x86_64 Complete!

    Start and Initialize PostgreSQL server instance by using following Linux command.

    [root@flectra-01 ~]# postgresql-setup --initdb --unit postgresql * Initializing database in '/var/lib/pgsql/data' * Initialized, logs are in /var/lib/pgsql/initdb_postgresql.log

    Enable and start PostgreSQL service as follows.

    [root@flectra-01 ~]# systemctl enable --now postgresql.service Created symlink /etc/systemd/system/ â /usr/lib/systemd/system/postgresql.service.

    Our PostgreSQL Server is ready to use now. Create a database user for Flectra ERP.

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

    By keeping the scope of this document limited, we are installing the available version of PostgreSQL from default yum repository. You can refer to our previous post to install latest version of PostgreSQL server on CentOS 8.


    Installing WKHTMLTOPDF on CentOS 8:

    Flectra ERP requires WKHTMLTOPDF software to generate reports in PDF format.

    WKHTMLTOPDF software is not available in default yum repositories, But we can download WKHTMLTOPDF from their official website.

    You can obtain the URL of WKHTMLTOPDF package from above link and then use wget command to download it directly in our Linux server.

    [root@flectra-01 ~]# cd /tmp [root@flectra-01 tmp]# wget --2020-10-12 22:17:09-- Resolving ( Connecting to (||:443... connected. HTTP request sent, awaiting response... 302 Found Location: [following] --2020-10-12 22:17:12-- Resolving ( Connecting to (||:443... connected. HTTP request sent, awaiting response... 200 OK Length: 16237416 (15M) [application/octet-stream] Saving to: âwkhtmltox-0.12.6-1.centos8.x86_64.rpmâ wkhtmltox-0.12.6-1. 100%[===================>] 15.48M 66.0KB/s in 6m 20s 2020-10-12 22:23:34 (41.7 KB/s) - âwkhtmltox-0.12.6-1.centos8.x86_64.rpmâ saved [16237416/16237416]

    Install WKHTMLTOPDF package by using following Linux command.

    [root@flectra-01 tmp]# dnf localinstall -y wkhtmltox-0.12.6-1.centos8.x86_64.rpm Last metadata expiration check: 0:56:51 ago on Mon 12 Oct 2020 09:30:17 PM PKT. Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: wkhtmltox x86_64 1:0.12.6-1.centos8 @commandline 15 M Installing dependencies: dejavu-fonts-common noarch 2.35-6.el8 BaseOS 74 k dejavu-sans-fonts noarch 2.35-6.el8 BaseOS 1.5 M fontconfig x86_64 2.13.1-3.el8 BaseOS 275 k fontpackages-filesystem noarch 1.44-22.el8 BaseOS 16 k libX11 x86_64 1.6.8-3.el8 AppStream 611 k libX11-common noarch 1.6.8-3.el8 AppStream 158 k libXau x86_64 1.0.8-13.el8 AppStream 36 k libXext x86_64 1.3.3-9.el8 AppStream 45 k libXrender x86_64 0.9.10-7.el8 AppStream 33 k libfontenc x86_64 1.1.3-8.el8 AppStream 37 k libjpeg-turbo x86_64 1.5.3-10.el8 AppStream 156 k libxcb x86_64 1.13.1-1.el8 AppStream 229 k ttmkfdir x86_64 3.0.9-54.el8 AppStream 62 k xorg-x11-font-utils x86_64 1:7.5-40.el8 AppStream 103 k xorg-x11-fonts-75dpi noarch 7.5-19.el8 AppStream 2.8 M xorg-x11-fonts-Type1 noarch 7.5-19.el8 AppStream 522 k Transaction Summary ================================================================================ Install 17 Packages Total size: 22 M Total download size: 6.5 M Installed size: 139 M Downloading Packages: (1/16): libXau-1.0.8-13.el8.x86_64.rpm 29 kB/s | 36 kB 00:01 (2/16): libXext-1.3.3-9.el8.x86_64.rpm 42 kB/s | 45 kB 00:01 (3/16): libX11-common-1.6.8-3.el8.noarch.rpm 67 kB/s | 158 kB 00:02 (4/16): libXrender-0.9.10-7.el8.x86_64.rpm 25 kB/s | 33 kB 00:01 (5/16): libfontenc-1.1.3-8.el8.x86_64.rpm 19 kB/s | 37 kB 00:01 (6/16): libjpeg-turbo-1.5.3-10.el8.x86_64.rpm 66 kB/s | 156 kB 00:02 (7/16): libX11-1.6.8-3.el8.x86_64.rpm 81 kB/s | 611 kB 00:07 (8/16): ttmkfdir-3.0.9-54.el8.x86_64.rpm 40 kB/s | 62 kB 00:01 (9/16): libxcb-1.13.1-1.el8.x86_64.rpm 54 kB/s | 229 kB 00:04 (10/16): xorg-x11-font-utils-7.5-40.el8.x86_64. 88 kB/s | 103 kB 00:01 (11/16): dejavu-fonts-common-2.35-6.el8.noarch. 100 kB/s | 74 kB 00:00 (12/16): xorg-x11-fonts-Type1-7.5-19.el8.noarch 89 kB/s | 522 kB 00:05 (13/16): fontconfig-2.13.1-3.el8.x86_64.rpm 80 kB/s | 275 kB 00:03 (14/16): xorg-x11-fonts-75dpi-7.5-19.el8.noarch 264 kB/s | 2.8 MB 00:10 (15/16): 33 kB/s | 16 kB 00:00 (16/16): dejavu-sans-fonts-2.35-6.el8.noarch.rp 131 kB/s | 1.5 MB 00:11 -------------------------------------------------------------------------------- Total 260 kB/s | 6.5 MB 00:25 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : fontpackages-filesystem-1.44-22.el8.noarch 1/17 Installing : dejavu-fonts-common-2.35-6.el8.noarch 2/17 Installing : dejavu-sans-fonts-2.35-6.el8.noarch 3/17 Installing : fontconfig-2.13.1-3.el8.x86_64 4/17 Running scriptlet: fontconfig-2.13.1-3.el8.x86_64 4/17 Installing : ttmkfdir-3.0.9-54.el8.x86_64 5/17 Installing : libjpeg-turbo-1.5.3-10.el8.x86_64 6/17 Installing : libfontenc-1.1.3-8.el8.x86_64 7/17 Installing : xorg-x11-font-utils-1:7.5-40.el8.x86_64 8/17 Installing : xorg-x11-fonts-75dpi-7.5-19.el8.noarch 9/17 Running scriptlet: xorg-x11-fonts-75dpi-7.5-19.el8.noarch 9/17 Installing : xorg-x11-fonts-Type1-7.5-19.el8.noarch 10/17 Running scriptlet: xorg-x11-fonts-Type1-7.5-19.el8.noarch 10/17 Installing : libXau-1.0.8-13.el8.x86_64 11/17 Installing : libxcb-1.13.1-1.el8.x86_64 12/17 Installing : libX11-common-1.6.8-3.el8.noarch 13/17 Installing : libX11-1.6.8-3.el8.x86_64 14/17 Installing : libXext-1.3.3-9.el8.x86_64 15/17 Installing : libXrender-0.9.10-7.el8.x86_64 16/17 Installing : wkhtmltox-1:0.12.6-1.centos8.x86_64 17/17 Running scriptlet: wkhtmltox-1:0.12.6-1.centos8.x86_64 17/17 Running scriptlet: fontconfig-2.13.1-3.el8.x86_64 17/17 Verifying : libX11-1.6.8-3.el8.x86_64 1/17 Verifying : libX11-common-1.6.8-3.el8.noarch 2/17 Verifying : libXau-1.0.8-13.el8.x86_64 3/17 Verifying : libXext-1.3.3-9.el8.x86_64 4/17 Verifying : libXrender-0.9.10-7.el8.x86_64 5/17 Verifying : libfontenc-1.1.3-8.el8.x86_64 6/17 Verifying : libjpeg-turbo-1.5.3-10.el8.x86_64 7/17 Verifying : libxcb-1.13.1-1.el8.x86_64 8/17 Verifying : ttmkfdir-3.0.9-54.el8.x86_64 9/17 Verifying : xorg-x11-font-utils-1:7.5-40.el8.x86_64 10/17 Verifying : xorg-x11-fonts-75dpi-7.5-19.el8.noarch 11/17 Verifying : xorg-x11-fonts-Type1-7.5-19.el8.noarch 12/17 Verifying : dejavu-fonts-common-2.35-6.el8.noarch 13/17 Verifying : dejavu-sans-fonts-2.35-6.el8.noarch 14/17 Verifying : fontconfig-2.13.1-3.el8.x86_64 15/17 Verifying : fontpackages-filesystem-1.44-22.el8.noarch 16/17 Verifying : wkhtmltox-1:0.12.6-1.centos8.x86_64 17/17 Installed: dejavu-fonts-common-2.35-6.el8.noarch dejavu-sans-fonts-2.35-6.el8.noarch fontconfig-2.13.1-3.el8.x86_64 fontpackages-filesystem-1.44-22.el8.noarch libX11-1.6.8-3.el8.x86_64 libX11-common-1.6.8-3.el8.noarch libXau-1.0.8-13.el8.x86_64 libXext-1.3.3-9.el8.x86_64 libXrender-0.9.10-7.el8.x86_64 libfontenc-1.1.3-8.el8.x86_64 libjpeg-turbo-1.5.3-10.el8.x86_64 libxcb-1.13.1-1.el8.x86_64 ttmkfdir-3.0.9-54.el8.x86_64 wkhtmltox-1:0.12.6-1.centos8.x86_64 xorg-x11-font-utils-1:7.5-40.el8.x86_64 xorg-x11-fonts-75dpi-7.5-19.el8.noarch xorg-x11-fonts-Type1-7.5-19.el8.noarch Complete!

    WKHTMLTOPDF and dependent packages has been installed on our Linux operating system.


    Installing Python on CentOS 8:

    Flectra ERP is built using Python programming language, therefore, we need Python runtimes to deploy Flectra application.

    Python 3 is available in default yum repository, therefore we are installing it by using dnf command.

    [root@flectra-01 ~]# dnf install -y python3 python3-devel Last metadata expiration check: 0:27:34 ago on Mon 12 Oct 2020 10:37:32 PM PKT. Dependencies resolved. ================================================================================ Package Arch Version Repo Size ================================================================================ Installing: python36 x86_64 3.6.8-2.module_el8.1.0+245+c39af44f AppStream 19 k python36-devel x86_64 3.6.8-2.module_el8.1.0+245+c39af44f AppStream 16 k Installing dependencies: platform-python-devel x86_64 3.6.8-23.el8 AppStream 246 k python-rpm-macros noarch 3-38.el8 AppStream 14 k python-srpm-macros noarch 3-38.el8 AppStream 14 k python3-pip noarch 9.0.3-16.el8 AppStream 19 k python3-rpm-generators noarch 5-6.el8 AppStream 24 k python3-rpm-macros noarch 3-38.el8 AppStream 13 k python3-setuptools noarch 39.2.0-5.el8 BaseOS 162 k Enabling module streams: python36 3.6 Transaction Summary ================================================================================ Install 9 Packages Total download size: 529 k Installed size: 1.2 M Downloading Packages: (1/9): python-rpm-macros-3-38.el8.noarch.rpm 21 kB/s | 14 kB 00:00 (2/9): python-srpm-macros-3-38.el8.noarch.rpm 15 kB/s | 14 kB 00:00 (3/9): python3-pip-9.0.3-16.el8.noarch.rpm 72 kB/s | 19 kB 00:00 (4/9): python3-rpm-macros-3-38.el8.noarch.rpm 77 kB/s | 13 kB 00:00 (5/9): python36-3.6.8-2.module_el8.1.0+245+c39a 128 kB/s | 19 kB 00:00 (6/9): python3-rpm-generators-5-6.el8.noarch.rp 38 kB/s | 24 kB 00:00 (7/9): python36-devel-3.6.8-2.module_el8.1.0+24 58 kB/s | 16 kB 00:00 (8/9): platform-python-devel-3.6.8-23.el8.x86_6 152 kB/s | 246 kB 00:01 (9/9): python3-setuptools-39.2.0-5.el8.noarch.r 191 kB/s | 162 kB 00:00 -------------------------------------------------------------------------------- Total 55 kB/s | 529 kB 00:09 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : python3-setuptools-39.2.0-5.el8.noarch 1/9 Installing : python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64 2/9 Running scriptlet: python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64 2/9 Installing : python3-pip-9.0.3-16.el8.noarch 3/9 Installing : python3-rpm-macros-3-38.el8.noarch 4/9 Installing : python3-rpm-generators-5-6.el8.noarch 5/9 Installing : python-srpm-macros-3-38.el8.noarch 6/9 Installing : python-rpm-macros-3-38.el8.noarch 7/9 Installing : platform-python-devel-3.6.8-23.el8.x86_64 8/9 Installing : python36-devel-3.6.8-2.module_el8.1.0+245+c39af44f.x 9/9 Running scriptlet: python36-devel-3.6.8-2.module_el8.1.0+245+c39af44f.x 9/9 Verifying : platform-python-devel-3.6.8-23.el8.x86_64 1/9 Verifying : python-rpm-macros-3-38.el8.noarch 2/9 Verifying : python-srpm-macros-3-38.el8.noarch 3/9 Verifying : python3-pip-9.0.3-16.el8.noarch 4/9 Verifying : python3-rpm-generators-5-6.el8.noarch 5/9 Verifying : python3-rpm-macros-3-38.el8.noarch 6/9 Verifying : python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64 7/9 Verifying : python36-devel-3.6.8-2.module_el8.1.0+245+c39af44f.x 8/9 Verifying : python3-setuptools-39.2.0-5.el8.noarch 9/9 Installed: platform-python-devel-3.6.8-23.el8.x86_64 python-rpm-macros-3-38.el8.noarch python-srpm-macros-3-38.el8.noarch python3-pip-9.0.3-16.el8.noarch python3-rpm-generators-5-6.el8.noarch python3-rpm-macros-3-38.el8.noarch python3-setuptools-39.2.0-5.el8.noarch python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64 python36-devel-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64 Complete!


    Installing Flectra Prerequisite Software Packages:

    Flectra ERP has a handful of dependent software packages. We are installing all of these software packages using a single Linux command.

    [root@flectra-01 ~]# dnf install -y git gcc wget nodejs libxslt-devel bzip2-devel openldap-devel libjpeg-devel freetype-devel -y ... Installed: binutils-2.30-73.el8.x86_64 bzip2-devel-1.0.6-26.el8.x86_64 cmake-filesystem-3.11.4-7.el8.x86_64 cpp-8.3.1-5.el8.0.2.x86_64 cyrus-sasl-2.1.27-1.el8.x86_64 cyrus-sasl-devel-2.1.27-1.el8.x86_64 emacs-filesystem-1:26.1-5.el8.noarch freetype-devel-2.9.1-4.el8.x86_64 gcc-8.3.1-5.el8.0.2.x86_64 git-2.18.4-2.el8_2.x86_64 git-core-2.18.4-2.el8_2.x86_64 git-core-doc-2.18.4-2.el8_2.noarch glibc-devel-2.28-101.el8.x86_64 glibc-headers-2.28-101.el8.x86_64 isl-0.16.1-6.el8.x86_64 kernel-headers-4.18.0-193.19.1.el8_2.x86_64 libgcrypt-devel-1.8.3-4.el8.x86_64 libgpg-error-devel-1.31-1.el8.x86_64 libjpeg-turbo-devel-1.5.3-10.el8.x86_64 libmpc-1.0.2-9.el8.x86_64 libpng-devel-2:1.6.34-5.el8.x86_64 libxcrypt-devel-4.1.1-4.el8.x86_64 libxml2-devel-2.9.7-7.el8.x86_64 libxslt-devel-1.1.32-4.el8.x86_64 nodejs-1:10.21.0-3.module_el8.2.0+391+8da3adc6.x86_64 nodejs-full-i18n-1:10.21.0-3.module_el8.2.0+391+8da3adc6.x86_64 npm-1:6.14.4- openldap-devel-2.4.46-11.el8_1.x86_64 perl-Carp-1.42-396.el8.noarch perl-Data-Dumper-2.167-399.el8.x86_64 perl-Digest-1.17-395.el8.noarch perl-Digest-MD5-2.55-396.el8.x86_64 perl-Encode-4:2.97-3.el8.x86_64 perl-Errno-1.28-416.el8.x86_64 perl-Error-1:0.17025-2.el8.noarch perl-Exporter-5.72-396.el8.noarch perl-File-Path-2.15-2.el8.noarch perl-File-Temp-0.230.600-1.el8.noarch perl-Getopt-Long-1:2.50-4.el8.noarch perl-Git-2.18.4-2.el8_2.noarch perl-HTTP-Tiny-0.074-1.el8.noarch perl-IO-1.38-416.el8.x86_64 perl-IO-Socket-IP-0.39-5.el8.noarch perl-IO-Socket-SSL-2.066-4.el8.noarch perl-MIME-Base64-3.15-396.el8.x86_64 perl-Mozilla-CA-20160104-7.el8.noarch perl-Net-SSLeay-1.88-1.el8.x86_64 perl-PathTools-3.74-1.el8.x86_64 perl-Pod-Escapes-1:1.07-395.el8.noarch perl-Pod-Perldoc-3.28-396.el8.noarch perl-Pod-Simple-1:3.35-395.el8.noarch perl-Pod-Usage-4:1.69-395.el8.noarch perl-Scalar-List-Utils-3:1.49-2.el8.x86_64 perl-Socket-4:2.027-3.el8.x86_64 perl-Storable-1:3.11-3.el8.x86_64 perl-Term-ANSIColor-4.06-396.el8.noarch perl-Term-Cap-1.17-395.el8.noarch perl-TermReadKey-2.37-7.el8.x86_64 perl-Text-ParseWords-3.30-395.el8.noarch perl-Text-Tabs+Wrap-2013.0523-395.el8.noarch perl-Time-Local-1:1.280-1.el8.noarch perl-URI-1.73-3.el8.noarch perl-Unicode-Normalize-1.25-396.el8.x86_64 perl-constant-1.33-396.el8.noarch perl-interpreter-4:5.26.3-416.el8.x86_64 perl-libnet-3.11-3.el8.noarch perl-libs-4:5.26.3-416.el8.x86_64 perl-macros-4:5.26.3-416.el8.x86_64 perl-parent-1:0.237-1.el8.noarch perl-podlators-4.11-1.el8.noarch perl-threads-1:2.21-2.el8.x86_64 perl-threads-shared-1.58-2.el8.x86_64 xz-devel-5.2.4-3.el8.x86_64 zlib-devel-1.2.11-16.el8_2.x86_64 Complete!

    Flectra ERP web requires 'less' JavaScript to properly render the style of the web pages. Therefore, we are installing it by using npm (Node Package Manager) command.

    [root@flectra-01 ~]# npm install -g less /usr/local/bin/lessc -> /usr/local/lib/node_modules/less/bin/lessc + less@3.12.2 added 12 packages from 45 contributors in 23.106s


    Installing Flectra ERP on CentOS 8:

    Create a Linux user to own Flectra software and processes.

    [root@flectra-01 ~]# useradd -r -m -U -d /opt/flectra -s /bin/bash flectra

    Switch to flectra user.

    [root@flectra-01 ~]# su - flectra Last login: Wed Oct 14 23:35:55 PKT 2020 on pts/0

    By using git command, create a clone of Flectra source code.

    [flectra@flectra-01 ~]$ git clone --depth=1 --branch=1.0 flectra Cloning into 'flectra'... remote: Enumerating objects: 26592, done. remote: Counting objects: 100% (26592/26592), done. remote: Compressing objects: 100% (18881/18881), done. remote: Total 26592 (delta 8354), reused 23223 (delta 6860), pack-reused 0 Receiving objects: 100% (26592/26592), 146.00 MiB | 75.00 KiB/s, done. Resolving deltas: 100% (8354/8354), done. Checking out files: 100% (24066/24066), done.

    Create a Python virtual environment for deploying Flectra ERP.

    [flectra@flectra-01 ~]$ python3 -m venv flectra01

    Activate the Python virtual environment.

    [flectra@flectra-01 ~]$ source flectra01/bin/activate (flectra01) [flectra@flectra-01 ~]$

    Upgrade the version of pip package by using following Linux command.

    (flectra01) [flectra@flectra-01 ~]$ pip install --upgrade pip 100% |ââââââââââââââââââââââââââââââââ| 1.5MB 326kB/s Installing collected packages: pipâââââââ Found existing installation: pip 9.0.3 Uninstalling pip-9.0.3:ââââââââââ Successfully uninstalled pip-9.0.3 Successfully installed pip-20.2.4â

    Flectra requires various Python modules to function properly. The source contains a complete list of required modules, therefore, we can use this file to install all the required modules in one go.

    (flectra01) [flectra@flectra-01 ~]$ pip3 install -r flectra/requirements.txt Ignoring gevent: markers 'sys_platform != "win32" and python_version >= "3.7"' don't match your environment Ignoring gevent: markers 'sys_platform == "win32" and python_version >= "3.7"' don't match your environment Ignoring greenlet: markers 'python_version >= "3.7"' don't match your environment Ignoring lxml: markers 'sys_platform != "win32" and python_version >= "3.7"' don't match your environment Ignoring lxml: markers 'sys_platform == "win32"' don't match your environment Ignoring Pillow: markers 'python_version >= "3.7"' don't match your environment Ignoring psutil: markers 'sys_platform == "win32"' don't match your environment Ignoring psycopg2: markers 'sys_platform == "win32"' don't match your environment Ignoring PyYAML: markers 'python_version >= "3.7"' don't match your environment Ignoring pypiwin32: markers 'sys_platform == "win32"' don't match your environment Collecting Babel==2.3.4 Using cached Babel-2.3.4-py2.py3-none-any.whl (7.1 MB) Collecting decorator==4.0.10 Using cached decorator-4.0.10-py2.py3-none-any.whl (9.2 kB) Collecting docutils==0.12 Using cached docutils-0.12-py3-none-any.whl (508 kB) Collecting ebaysdk==2.1.5 Using cached ebaysdk-2.1.5.tar.gz (42 kB) Collecting feedparser==5.2.1 Using cached feedparser-5.2.1.tar.bz2 (192 kB) Collecting gevent==1.1.2 Using cached gevent-1.1.2.tar.gz (2.0 MB) Collecting greenlet==0.4.10 Using cached greenlet-0.4.10.tar.gz (57 kB) Collecting html2text==2016.9.19 Using cached html2text-2016.9.19.tar.gz (47 kB) Collecting Jinja2==2.10.1 Using cached Jinja2-2.10.1-py2.py3-none-any.whl (124 kB) Collecting lxml==3.7.1 Using cached lxml-3.7.1.tar.gz (3.8 MB) Collecting Mako==1.0.4 Using cached Mako-1.0.4.tar.gz (574 kB) Collecting MarkupSafe==0.23 Using cached MarkupSafe-0.23.tar.gz (13 kB) Collecting mock==2.0.0 Using cached mock-2.0.0-py2.py3-none-any.whl (56 kB) Collecting num2words==0.5.6 Using cached num2words-0.5.6-py2.py3-none-any.whl (64 kB) Collecting oauthlib==2.0.7 Using cached oauthlib-2.0.7-py2.py3-none-any.whl (124 kB) Collecting ofxparse==0.16 Using cached ofxparse-0.16.tar.gz (49 kB) Collecting passlib==1.6.5 Using cached passlib-1.6.5-py2.py3-none-any.whl (317 kB) Collecting Pillow==4.0.0 |ââââââââââââââââââââââââââââââââ| 446 kB 427 kB/s Collecting validate-email==1.3ââââââ Downloading validate_email-1.3.tar.gz (4.7 kB) |ââââââââââââââââââââââââââââââââ| 106 kB 473 kB/s Collecting six>=1.9âââ Downloading six-1.15.0-py2.py3-none-any.whl (10 kB) Collecting beautifulsoup4 Downloading beautifulsoup4-4.9.3-py3-none-any.whl (115 kB) |ââââââââââââââââââââââââââââââââ| 115 kB 353 kB/s |ââââââââââââââââââââââââââââââââ| 112 kB 599 kB/s Requirement already satisfied: setuptools in ./flectra01/lib/python3.6/site-packages (from pyldap==2.4.28->-r flectra/requirements.txt (line 30)) (39.2.0) Requirement already satisfied: pip>=1.4.1 in ./flectra01/lib/python3.6/site-packages (from reportlab==3.3.0->-r flectra/requirements.txt (line 40)) (20.2.4) |ââââââââââââââââââââââââââââââââ| 888 kB 670 kB/s Collecting traceback2âââââââââââââââââ Downloading traceback2-1.4.0-py2.py3-none-any.whl (16 kB) Collecting argparseâââââââââââââ Downloading argparse-1.4.0-py2.py3-none-any.whl (23 kB) Collecting soupsieve>1.2; python_version >= "3.0" Downloading soupsieve-2.0.1-py3-none-any.whl (32 kB) Collecting linecache2 Downloading linecache2-1.0.0-py2.py3-none-any.whl (12 kB) Using legacy ' install' for ebaysdk, since package 'wheel' is not installed. |â Using legacy ' install' for feedparser, since package 'wheel' is not installed. Using legacy ' install' for gevent, since package 'wheel' is not installed. Using legacy ' install' for greenlet, since package 'wheel' is not installed. Using legacy ' install' for html2text, since package 'wheel' is not installed. Using legacy ' install' for lxml, since package 'wheel' is not installed. Using legacy ' install' for Mako, since package 'wheel' is not installed. Using legacy ' install' for MarkupSafe, since package 'wheel' is not installed. Using legacy ' install' for ofxparse, since package 'wheel' is not installed. Using legacy ' install' for psutil, since package 'wheel' is not installed. Using legacy ' install' for psycopg2, since package 'wheel' is not installed. Using legacy ' install' for pydot, since package 'wheel' is not installed. Using legacy ' install' for pyldap, since package 'wheel' is not installed. Using legacy ' install' for pyusb, since package 'wheel' is not installed. Using legacy ' install' for PyYAML, since package 'wheel' is not installed. Using legacy ' install' for reportlab, since package 'wheel' is not installed. Using legacy ' install' for suds-jurko, since package 'wheel' is not installed. Using legacy ' install' for vatnumber, since package 'wheel' is not installed. Using legacy ' install' for vobject, since package 'wheel' is not installed. Using legacy ' install' for pycrypto, since package 'wheel' is not installed. Using legacy ' install' for validate-email, since package 'wheel' is not installed. Using legacy ' install' for olefile, since package 'wheel' is not installed. Installing collected packages: pytz, Babel, decorator, docutils, lxml, certifi, idna, chardet, urllib3, requests, ebaysdk, feedparser, greenlet, gevent, html2text, MarkupSafe, Jinja2, Mako, pbr, six, mock, num2words, oauthlib, soupsieve, beautifulsoup4, ofxparse, passlib, olefile, Pillow, psutil, psycopg2, pyparsing, pydot, pyldap, pyserial, python-dateutil, pyusb, PyYAML, qrcode, reportlab, suds-jurko, python-stdnum, vatnumber, vobject, Werkzeug, XlsxWriter, xlwt, xlrd, linecache2, traceback2, argparse, unittest2, numpy, pycrypto, validate-email Attempting uninstall: pytz Found existing installation: pytz 2020.1 Uninstalling pytz-2020.1: Successfully uninstalled pytz-2020.1 Attempting uninstall: Babel Found existing installation: Babel 2.8.0 Uninstalling Babel-2.8.0: Successfully uninstalled Babel-2.8.0 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 Attempting uninstall: passlib Found existing installation: passlib 1.7.4 Uninstalling passlib-1.7.4: Successfully uninstalled passlib-1.7.4 Running install for olefile ... done Running install for psutil ... done Running install for psycopg2 ... done Running install for pydot ... done Running install for pyldap ... done Running install for pyusb ... done Running install for PyYAML ... done Running install for reportlab ... done Running install for suds-jurko ... done Running install for vatnumber ... done Running install for vobject ... done Attempting uninstall: Werkzeug Found existing installation: Werkzeug 1.0.1 Uninstalling Werkzeug-1.0.1: Successfully uninstalled Werkzeug-1.0.1 Running install for pycrypto ... done Running install for validate-email ... done Successfully installed Babel-2.3.4 Jinja2-2.10.1 Mako-1.0.4 MarkupSafe-0.23 Pillow-4.0.0 PyYAML-3.12 Werkzeug-0.11.15 XlsxWriter-0.9.3 argparse-1.4.0 beautifulsoup4-4.9.3 certifi-2020.6.20 chardet-3.0.4 decorator-4.0.10 docutils-0.12 ebaysdk-2.1.5 feedparser-5.2.1 gevent-1.1.2 greenlet-0.4.10 html2text-2016.9.19 idna-2.7 linecache2-1.0.0 lxml-3.7.1 mock-2.0.0 num2words-0.5.6 numpy-1.14.3 oauthlib-2.0.7 ofxparse-0.16 olefile-0.46 passlib-1.6.5 pbr-5.5.0 psutil-4.3.1 psycopg2-2.8.5 pycrypto-2.6.1 pydot-1.2.3 pyldap-2.4.28 pyparsing-2.1.10 pyserial-3.1.1 python-dateutil-2.5.3 python-stdnum-1.14 pytz-2016.7 pyusb-1.0.0 qrcode-5.3 reportlab-3.3.0 requests-2.20.0 six-1.15.0 soupsieve-2.0.1 suds-jurko-0.6 traceback2-1.4.0 unittest2-1.1.0 urllib3-1.24.3 validate-email-1.3 vatnumber-1.2 vobject-0.9.3 xlrd-1.0.0 xlwt-1.3.0

    Deactivate the Python virtual environment.

    (flectra01) [flectra@flectra-01 ~]$ deactivate

    Exit from flectra user shell.

    [flectra@flectra-01 ~]$ exit logout

    Create directories for Flectra configuration, executables and log files.

    [root@flectra-01 ~]# mkdir /opt/flectra/addons [root@flectra-01 ~]# mkdir /var/log/flectra [root@flectra-01 ~]# mkdir /etc/flectra [root@flectra-01 ~]# touch /var/log/flectra/flectra.log

    Change the owner of the newly created directories to flectra user.

    [root@flectra-01 ~]# chown -R flectra:flectra /opt/flectra/addons [root@flectra-01 ~]# chown -R flectra:flectra /var/log/flectra [root@flectra-01 ~]# chown -R flectra:flectra /etc/flectra

    Edit Flectra configuration file.

    [root@flectra-01 ~]# vi /etc/flectra/flectra.conf

    Add following configurations in this file.

    [options] admin_passwd = Ahmer@1234 db_host = False db_port = False db_user = flectra db_password = False logfile = /var/log/flectra/flectra.log logrotate = True proxy_mode = True addons_path = /opt/flectra/flectra/addons, /opt/flectra/addons


    Create a Systemd Service for Flectra ERP:

    To enable autostart of Flectra at Linux startup, we need to create a SystemD service for Flectra ERP.

    Use vim editor to create a service file for Flectra.

    [root@flectra-01 ~]# vi /etc/systemd/system/flectra.service

    Add following directives in this file.

    [Unit] Description=flectra [Service] Type=simple SyslogIdentifier=flectra PermissionsStartOnly=true User=flectra Group=flectra ExecStart=/opt/flectra/flectra01/bin/python3 /opt/flectra/flectra/flectra-bin -c /etc/flectra/flectra.conf StandardOutput=journal+console [Install]

    Notify the Systemd about the changes in service file by using following systemctl command.

    [root@flectra-01 ~]# systemctl daemon-reload

    Enable and start Flectra service.

    [root@flectra-01 ~]# systemctl enable --now flectra Created symlink /etc/systemd/system/ â /etc/systemd/system/flectra.service.


    Configure Linux Firewall for Flectra ERP:

    To verify, is Flectra service running on default port 7073? execute the following Linux command.

    [root@flectra-01 ~]# ss -tulpn | grep 7073 tcp LISTEN 0 128* users:(("python3",pid=19844,fd=5))

    Allow Flectra service port in Linux firewall, to make the Flectra ERP accessible across the network.

    [root@flectra-01 ~]# firewall-cmd --permanent --add-port=7073/tcp success [root@flectra-01 ~]# firewall-cmd --reload success


    Accessing Flectra ERP Web UI:

    Open URL in a client's browser.


    Fill out the form and click on "Create Database". The master password is one that we have set in the /etc/flectra/flectra.conf file.


    You have reached at the Dashboard of the Flectra ERP. You can now customize the Flectra ERP according to your business requirement and start using it to manage different aspects of your business.



    We have successfully installed Flectra ERP/CRM on CentOS 8 server. Read The Linux Command Line, 2nd Edition: A Complete Introduction by William Shotts, if you have difficulty in understanding this installation guide.


    1. i found error like this

      Style error
      The style compilation failed, see the error below. Your recent actions may be the cause, please try reverting the changes you made.

      (b'', b'The "--no-js" argument is deprecated, as inline JavaScript is disabled by default. Use "--js" to enable inline JavaScript (not recommended).
      ArgumentError: Error evaluating function `floor`: argument must be a number in - on line 3159, column 17:
      3158 height: @planner-height;
      3159 margin: floor((@flectra-navbar-height - @planner-height)/2) 10px 0;
      3160 cursor: pointer;

      ')This error occured while compiling the bundle 'web.assets_common' containing:
      - /web/static/lib/bootstrap/less/variables.less
      - /web/static/lib/bootstrap/less/mixins/vendor-prefixes.less
      - /web/static/lib/bootstrap/less/mixins/buttons.less
      - /web/static/lib/bootstrap/less/mixins/clearfix.less
      - /web/static/lib/bootstrap/less/mixins/size.less
      - /web/static/src/less/variables.less
      - /web/static/src/less/utils.less
      - /web_editor/static/src/less/web_editor.variables.less
      - /web/static/lib/bootstrap-datetimepicker/src/less/_bootstrap-datetimepicker.less
      - /web/static/src/less/fonts.less
      - /web/static/src/less/navbar.less
      - /web/static/src/less/mimetypes.less
      - /web/static/src/less/modal.less
      - /web/static/src/less/animation.less
      - /web/static/src/less/rainbow.less
      - /web/static/src/less/datepicker.less
      - /web_planner/static/src/less/web_planner_common.less
      - /web_tour/static/src/less/tip.less
      - /web_tour/static/src/less/keyframes.less

      1. Please discuss it with me on our Facebook page.