Claroline – Server installation (dev) – EN

  • Auteur/autrice de la publication :
  • Post category:Non classé

Claroline Connect is an Open Source LMS (Learning Management System) licensed under GPLv3 to create and administer online training and workspaces. It is written in PHP and developed by the Research and Development Center of ECAM and the Catholic University of Louvain. The latest functional version via the archive is 7.0.0 (or 16.05, old numbering), compatible with PHP ≤ 7.1. We will install here the latest version in development via Composer / PHP CLI, 12.4 (new numbering), compatible with PHP ≥ 7.1. It is therefore compatible with Debian 10 Buster where PHP is installed in version 7.3 by default.

Open Source alternatives to Claroline Connect :

THIS COURSE IS AVAILABLE IN VIDEO
(DETAILED AND MORE COMPLETE VERSION)

English version

How to install an Open Source LMS – Part 1
How to install an Open Source LMS – Part 2

GOAL

The goal of this article is the installation and configuration of Claroline 12.4 on a self-hosted LAMP7 server (Linux Apache 2.4 MariaDB 10.3 PHP 7.3) on the Debian Buster 10.2 64-bit Linux distribution (LAMP 1/4).

LOGICAL DIAGRAM

PREREQUISITES

1. Prerequisites before setting up

  • A functional Debian Buster 10.2 64-bit server (basic installation with usual system utilities and SSH service)
  • Additional basic packages : sudo, dnsutils, git, resolvconf, terminator, tree
  • Domain used : opensharing.priv

2. Initial network configuration :

Claroline server
FQDN mylms.opensharing.priv
IP address 192.168.1.10
Network 192.168.1.0/24
Gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4
dns-search opensharing.priv

Initial content of the file /etc/network/interfaces :

sudo nano /etc/network/interfaces
auto lo
iface lo inet loopback

allow-hotplug enp0s3
iface enp0s3 inet static
	address 192.168.1.10
	netmask 255.255.255.0
	network 192.168.1.0
	broadcast 192.168.1.255
	gateway 192.168.1.1
	dns-search opensharing.priv
	dns-nameservers 8.8.8.8 8.8.4.4

Initial content of the file /etc/hosts :

sudo nano /etc/hosts
127.0.0.1       localhost.localdomain                   localhost
192.168.1.10    mylms.opensharing.priv                  mylms

Note : The loopback address 127.0.1.1 must be removed on a fixed IP server and replaced by the latter, such as the example above.

Initial content of the file /etc/host.conf :

sudo nano /etc/host.conf
order hosts, bind
multi on

Initial content of the file /etc/resolv.conf (generated automatically) :

cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
nameserver 8.8.4.4
search opensharing.priv

Notes : The file /etc/resolv.conf should not be edited once the resolvconf package has been installed.

To take into account the changes to the configuration files related to the network, restart the network service and the network interface configured as fixed IP:

sudo systemctl restart networking
sudo ifup enp0s3

Verifying the correct network configuration:

ping 8.8.8.8
dig opensharing.fr

RÉALISATION

1. Installing Apache (LAMP 2/4)

sudo apt-get update
sudo apt-get upgrade
apt-get install apache2 apache2-doc

2. Configuring Apache (LAMP2/4)

Creating a minimal configuration for our LMS :

sudo nano /etc/apache2/sites-available/mylms.conf
<VirtualHost *:80>

   DocumentRoot /var/www/mylmshttps://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
All settings correct for using Composer
Downloading...

Composer (version 1.9.1) successfully installed to: /usr/local/bin/composer
Use it: php /usr/local/bin/composer

8. Installing Node.js 12 and NPM 6

curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
sudo apt-get install -y nodejs
nodejs --version

v12.13.1

npm --version

6.12.1

9. Installing Claroline

sudo mkdir /var/www/mylms/

mkdir: created directory ‘/var/www/mylms/’

sudo chown -v www-data:www-data /var/www/{,mylms}

changed ownership of ‘/var/www/’ from root:root to www-data:www-data
changed ownership of ‘/var/www/mylms’ from root:root to www-data:www-data

sudo -u www-data git clone https://github.com/claroline/Claroline /var/www/mylms/

Cloning into ‘/var/www/mylms’…
remote: Enumerating objects: 25, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 70146 (delta 15), reused 1 (delta 1), pack-reused 70121
Receiving objects: 100% (70146/70146), 13.94 MiB | 4.53 MiB/s, done.
Resolving deltas: 100% (39908/39908), done.

cd /var/www/mylms/
sudo -u www-data php scripts/configure.php

Please provide a value for the following parameters:
database_host (localhost):
database_name (claroline): mylmsdb
database_user (root): mylmsadmin
database_password: mylmsadminpw
secret (change_me): mysecret
Config file app/config/parameters.yml written

sudo -u www-data composer update --prefer-dist --no-dev

Note : Execution time : 4 min 4 s with 4 GB of RAM

sudo -u www-data npm install
sudo -u www-data composer build
sudo -u www-data php app/console claroline:install
sudo -u www-data php app/console claroline:user:create -a

first name: John
last name: Doe
username: mylmsadmin
password: mylmsadminpw
email: admin@opensharing.priv

sudo systemctl restart mariadb
sudo systemctl restart apache2

10. First connection via the Web

http://mylms.opensharing.priv

The front-office can be accessed :

We can then connect to the site :

And the back office is displayed :

We can visualize our workspaces :

We can personalize our site and add our resources :