How To Install OpenEduCat 13 on Ubuntu 18.04 LTS x64

Introduction

In this tutorial, we’ll install and configure OpenEduCat version 12 on Ubuntu 18.04 LTS x64. We can use the same installation instructions for both server and desktop edition.We will cover how to install the software in two different ways, each of which have their own benefits depending on your specific needs.

Prerequisites

Before starting this tutorial, you will need:

  • An Ubuntu 18.04 Desktop or Server with a root, sudo-enabled user.
  • A good internet connection to download the packages via various internet repositories.

Option 1 :

Step by step guide to install guide. Execute each step as “root” user.

Step 1 — Add flectra user to the system

sudo adduser --system --quiet --shell=/bin/bash --home=/opt/flectra --gecos 'flectra' --group flectra

Step 2 — Make Configuration Directory and Log Directory

sudo mkdir /etc/flectra && mkdir /var/log/flectra/

Step 3 — Installing Necessary OS Related Packages

sudo apt-get update && apt-get upgrade -y && apt-get install postgresql-10 postgresql-server-dev-10 build-essential python3-pillow python3-lxml python-ldap3 python3-dev python3-pip python3-setuptools npm nodejs git gdebi libldap2-dev libsasl2-dev libxml2-dev libxslt1-dev libjpeg-dev -y

Step 4 — Cloning flectra 13 From Source Repository

git clone --depth=1 --branch=13.0 https://github.com/flectra/flectra.git /opt/flectra/flectra

Step 5 — Cloning OpenEduCat 13 From Source Repository

git clone --depth=1 --branch=13.0 https://github.com/openeducat/openeducat_erp.git /opt/flectra/openeducat

Step 6 — Change Ownership of flectra Directory

sudo chown flectra:flectra /opt/flectra/ -R && sudo chown flectra:flectra /var/log/flectra/ -R

Step 7 — Installing Python Packages Required by flectra

cd /opt/flectra/flectra && sudo pip3 install -r requirements.txt

Step 8 — Installing Node Packages Required by flectra

sudo npm install -g less less-plugin-clean-css -y && sudo ln -s /usr/bin/nodejs /usr/bin/node

Step 9 — Installing wkhtmltopdf

cd /tmp && wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb && sudo gdebi -n wkhtmltox_0.12.5-1.bionic_amd64.deb && rm wkhtmltox_0.12.5-1.bionic_amd64.deb

Step 10 — Linking wkhtmltopdf as Command

sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin/ && sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin/

Step 11 — Creating PostgreSQL user for flectra

sudo su - postgres -c "createuser -s flectra"

Step 12 — Starting flectra and Creating Config File

sudo su - flectra -c "/opt/flectra/flectra/flectra-bin --addons-path=/opt/flectra/flectra/addons -s --stop-after-init"

Step 13 — Moving Config File To Config Directory

sudo mv /opt/flectra/.flectrarc /etc/flectra/flectra.conf

Step 14 — Modifying Configuration Parameters

sudo sed -i "s,^\(addons_path = \).*,\1"/opt/flectra/flectra/addons\\,/opt/flectra/openeducat/"," /etc/flectra/flectra.conf sudo sed -i "s,^\(logfile = \).*,\1"/var/log/flectra/flectra-server.log"," /etc/flectra/flectra.conf sudo sed -i "s,^\(logrotate = \).*,\1"True"," /etc/flectra/flectra.conf sudo sed -i "s,^\(proxy_mode = \).*,\1"True"," /etc/flectra/flectra.conf

Step 15 — Setting up flectra Executable

sudo cp /opt/flectra/flectra/debian/init /etc/init.d/flectra && chmod +x /etc/init.d/flectra sudo ln -s /opt/flectra/flectra/flectra-bin /usr/bin/flectra

Step 16 — Setting Up flectra To Start at OS StartUp

sudo update-rc.d -f flectra start 20 2 3 4 5 .

Step 17 — Starting flectra

sudo service flectra start

Option 2 :

sudo wget openeducat.org/i/oec12ubuntu && bash oec12ubuntu