Edjet LMS Server 6.4

Setup a Linux server

This tutorial will guide you trough the setup of a virtual or physical server with Linux operating system.

Article outline:

Introduction

Edjet LMS can be run on any Linux distribution, that can run the required software. It can also run on Windows and in the Docker container.

This guide will guide you trough installation on the Ubuntu Server 18.04 LTS.

For more info & documentation about Ubuntu Server visit https://help.ubuntu.com/

Launch a Linux server

You can use any cloud provider of your choice to launch virtual machine or use any other way to run a Linux server.

Follow the tutorial Get started with Amazon EC2 Linux instances. We recommend to choose Ubuntu Server 18 AMI over the of Amazon Linux AMI.

Install and configure Apache

Download and install Apache 2.4 webserver and run the webserver as a service.

  1. Update list of package manager repositories:
    sudo apt update
  2. Install Apache 2.4 web server:
    sudo apt install apache2
  3. Enable mod_rewrite:
    sudo a2enmod rewrite
  4. Configure htaccess in the Apache SSL config file:
    sudo nano /etc/apache2/sites-available/default-ssl.conf
    and add following lines before end of the section <VirtualHost>:
    <Directory /var/www/html/>
    Options FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
    </Directory>
  5. Restart the Apache webserver:
    sudo service apache2 restart

Setup HTTPS connection (SSL)

Configure Apache to setup setup HTTPS connection and SSL certificates to run Edjet LMS securely.

  1. Enable SSL module:
    sudo a2enmod ssl
  2. Enable default SSL site:
    sudo a2ensite default-ssl
  3. Redirect all requests from http to https in the Apache config file:
    sudo nano /etc/apache2/sites-available/000-default.conf
    and add lines into section <VirtualHost>:
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
  4. Copy your SSL certificates (.pem and .key) into folders:
    • SSLCertificateFile to: "/etc/ssl/certs/ssl-cert-snakeoil.pem".
    • SSLCertificateKeyFile to: "/etc/ssl/private/ssl-cert-snakeoil.key"
  5. To match certificate names and Apache config, you can either:
    • Rename the files to "ssl-cert-snakeoil.pem" and "ssl-cert-snakeoil.key".
    • Update the Apache config to your names.
  6. Restart the Apache webserver:
    sudo service apache2 restart

For more information and Apache documentation visit http://httpd.apache.org/

Install and configure PostgreSQL

Download and install PostgreSQL and enable support in PHP.

  1. Install PostgreSQL 10:
    sudo apt install postgresql
  2. Enable PostgreSQL support in PHP (load a db driver via Apache):
    sudo apt install php-pgsql

Create LMS database

Create a new database to be used by LMS.

  1. Switch to psql:
    sudo su postgres
    and then:
    psql
  2. Create new role "template_c6":
    CREATE ROLE template_c6 WITH LOGIN PASSWORD '*******' CREATEDB;
    Replace ******* with your strong password.
  3. Create new database named "learnis"* with owner "template_c6":
    CREATE DATABASE learnis;
    *You can choose different name according to your project name.
  4. Set role "template_c6" as and owner of database "learnis":
    ALTER DATABASE learnis OWNER TO template_c6;
  5. Quit psql and leave postgres user:
    \q
    and then:
    exit
  6. Restart the PostgreSQL:
    sudo service postgresql restart

Install and configure PHP

Download and install PHP and configure php.ini.

  1. Install PHP and extensions:
    sudo apt install libapache2-mod-php php php-gd php-zip php-xml php-mbstring php-ldap
  2. Enable short open tags for CLI (command line) in the configuration file php.ini:
    sudo nano /etc/php/7.2/cli/php.ini
    and change line:
    short_open_tag = Off
    to
    short_open_tag = On
  3. Enable short open tags for Apache in the configuration file php.ini:
    sudo nano /etc/php/7.2/apache2/php.ini
    and change line:
    short_open_tag = Off
    to
    short_open_tag = On
  4. Set max. upload size for Apache in config file "/etc/php/7.2/apache2/php.ini":
    upload_max_filesize = 500M
  5. Set max. post size for Apache in config file "/etc/php/7.2/apache2/php.ini":
    post_max_size = 508M
  6. Set max. input vars for Apache in config file "/etc/php/7.2/apache2/php.ini":
    max_input_vars = 100000
  7. Restart the Apache webserver:
    sudo service apache2 restart

Install and configure ionCube Loader

  1. Download ionCube PHP Loader for Linux (x86 64-bit):
    sudo wget http://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
  2. Extract downloaded archive:
    sudo tar zxvf ioncube_loaders_lin_x86-64.tar.gz
  3. Move folder with loaders:
    sudo mv ioncube /usr/local/
  4. Enable the loader in the config file:
    sudo nano /etc/php/7.2/apache2/conf.d/00-ioncube_loader.ini
    and add line:
    zend_extension=/usr/local/ioncube/ioncube_loader_lin_7.2.so
  5. Copy config file for CLI:
    sudo cp /etc/php/7.2/apache2/conf.d/00-ioncube_loader.ini /etc/php/7.2/cli/conf.d/
  6. Restart the Apache webserver:
    sudo service apache2 restart

Configure CRON

CRON is used to run Edjet LMS Server scripts periodically.

  1. Create CRON directory:
    sudo mkdir /etc/cron.1minute
  2. Open /etc/crontab file:
    sudo nano /etc/crontab
    Add line to create crontab entry:
    *  *  * * * root    cd / && run-parts /etc/cron.1minute
  3. Create file /etc/cron.1minute/edjet_lms_cron:
    sudo nano /etc/cron.1minute/edjet_lms_cron
    Insert code to run cron_launcher.php:
    #! /bin/sh
    php /var/www/html/components/cron_launcher.php
  4. Set execute permissions to file:
    sudo chmod +x /etc/cron.1minute/edjet_lms_cron

Download Edjet LMS Server

Download Edjet LMS Server installation file (zip archive) to the server and prepare everything for the LMS installation.

The Edjet LMS application files will be placed in the folder "/var/www/html".

  1. Clear all files (including hidden files, .htaccess etc.) in the folder "/var/www/html":
    sudo rm -rf /var/www/html/{*,.*}
    Notices about "." and ".." folders cannot be deleted can be ignored.
  2. Download the Edjet LMS Server installation file:
    sudo wget https://s3-eu-west-1.amazonaws.com/ntv-download/netventic_downloadable_6.4.23.zip -P /home/ubuntu/
  3. Install unzip:
    sudo apt install unzip
  4. Extract the downloaded installation file to "var/www/html":
    sudo unzip /home/ubuntu/netventic_downloadable_6.4.23.zip -d /var/www/html
  5. Change permissions for "/var/www/html" folder and all files and folders in it:
    sudo chmod -R 775 /var/www/html
  6. Change owner for "/var/www/html" folder and all files and folders in it:
    sudo chown -R www-data:www-data /var/www/html

Steps 5 and 6 are about making sure the installer/app is able to write where necessary.

You have completed the server setup. Congratulations!
Now you can move to the installation of Edjet LMS Server.

Troubleshooting setup

If you are reporting issues, please provide as much info about the error as possible, namely:

  • Provide operating system including version.
  • Provide what software dependencies you use, including versions.
  • Provide (copy & paste) text(s) or screenshot(s) of any error(s) displayed.
  • Provide any other additional info that can help us to find a solution for error.
Installation and upgrade