How to Install Opigno LMS on Ubuntu 18.04

Opigno LMS is a free, open-source, full-fledged Learning Management System based on Drupal that allows you to administer online training efficiently. It is specially designed for companies, and universities looking for an e-learning solutions. Opigno LMS is used to manage training paths, sell your training online, award certificates to successful students and many more.

This tutorial will teach us how to install and configure Opigno LMS on Ubuntu 18.04 server.

Requirements

  • A server running Ubuntu 18.04.
  • A root password is setup to your server.

Getting Started

Before starting, you will need to update your system with the latest version. You can do this by running the following command:

apt-get update -y
apt-get upgrade -y

Once your server is updated, restart your server to apply the changes.

Install LAMP Server

First, you will need to install Apache web server, MariaDB server, PHP and other packages to your system. You can install all of them with the following command:

apt-get install apache2 mariadb-server php7.2 libapache2-mod-php7.2 php7.2-common php7.2-sqlite3 php7.2-curl php7.2-intl php7.2-mbstring php7.2-xmlrpc php7.2-mysql php7.2-gd php7.2-xml php7.2-cli php7.2-zip unzip wget -y

Once all the packages are installed, start Apache and MariaDB service and enable them to start on boot time with the following command:

systemctl start apache2
systemctl enable apache2
systemctl start mariadb
systemctl enable mariadb

Next, you will need to open php.ini file and make some changes:

nano /etc/php/7.2/apache2/php.ini

Make the following changes:

memory_limit = 256M
post_max_size = 100M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = Asia/Kolkata

Save and close the file, when you are finished.

Configure MariaDB Server

By default, MariaDB is not secured. So, you will need to secure it. You can do this by running the mysql_secure_installation script:

mysql_secure_installation

This script will change your current root password, remove anonymous users, disallow root login remotely as shown below:

    Enter current password for root (enter for none):
    Set root password? [Y/n]: N
    Remove anonymous users? [Y/n]: Y
    Disallow root login remotely? [Y/n]: Y
    Remove test database and access to it? [Y/n]:  Y
    Reload privilege tables now? [Y/n]:  Y

Once the MariaDB is secured, log in to MariaDB shell with the following command:

mysql -u root -p

Provide your root password. Then, create a database and user for Opigno with the following command:

MariaDB [(none)]> CREATE DATABASE opigno;
MariaDB [(none)]> CREATE USER 'opignouser'@'localhost' IDENTIFIED BY 'password';

Next, grant all the privileges to Opigno database with the following command:

MariaDB [(none)]> GRANT ALL PRIVILEGES ON opigno.* TO 'opignouser'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;

Next, flush the privileges and exit from the MariaDB shell with the following command:

MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit

Once you have done, you can proceed to the next step.

Install Opigno LMS

First, you will need to download the latest version of Opigno LMS from their official website. You can download it with the following command:

wget https://www.opigno.org/sites/default/files/opigno-with-dependencies-v2.5.zip

Once the download is completed, unzip the downloaded file to the Apache web root directory with the following command:

mkdir /var/www/html/opigno
unzip opigno-with-dependencies-v2.5.zip -d /var/www/html/opigno/

Next, give proper permissions to the opigno directory with the following command:

chown -R www-data:www-data /var/www/html/opigno
chmod -R 755 /var/www/html/opigno

Once you have done, you can proceed to the next step.

Configure Apache for Opigno LMS

Next, you will need to create an Apache virtual host file for Opigno LMS. You can create it with the following command:

nano /etc/apache2/sites-available/opigno.conf

Add the following lines:

<VirtualHost *:80>
     ServerAdmin [email protected]
     DocumentRoot /var/www/html/opigno
     ServerName example.com

     <Directory /var/www/html/opigno/>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/opigno_error.log
     CustomLog ${APACHE_LOG_DIR}/opigno_access.log combined

     <Directory /var/www/html/opigno/>
         RewriteEngine on
         RewriteBase /
         RewriteCond %{REQUEST_FILENAME} !-f
         RewriteCond %{REQUEST_FILENAME} !-d
         RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
     </Directory>
</VirtualHost>

Save and close the file, when you are finished. Then, enable Apache virtual host file with the following command:

a2ensite opigno.conf

Next, enable Apache rewrite module and restart Apache service to apply all the changes with the following command:

a2enmod rewrite
systemctl restart apache2

You can also check the status of Apache web server by running the following command:

systemctl status apache2

You should see the following output:

? apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           ??apache2-systemd.conf
   Active: active (running) since Sun 2019-05-26 16:10:49 UTC; 54min ago
  Process: 16700 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
  Process: 16705 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 16722 (apache2)
    Tasks: 11 (limit: 1114)
   CGroup: /system.slice/apache2.service
           ??16722 /usr/sbin/apache2 -k start
           ??16727 /usr/sbin/apache2 -k start
           ??16728 /usr/sbin/apache2 -k start
           ??16731 /usr/sbin/apache2 -k start
           ??16734 /usr/sbin/apache2 -k start
           ??16751 /usr/sbin/apache2 -k start
           ??16752 /usr/sbin/apache2 -k start
           ??16889 /usr/sbin/apache2 -k start
           ??16942 /usr/sbin/apache2 -k start
           ??16948 /usr/sbin/apache2 -k start
           ??16951 /usr/sbin/apache2 -k start

May 26 16:10:48 ubuntu1804 systemd[1]: Starting The Apache HTTP Server...
May 26 16:10:49 ubuntu1804 apachectl[16705]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192
May 26 16:10:49 ubuntu1804 systemd[1]: Started The Apache HTTP Server.

Once you are done, you can proceed to the next step.

Access Opigno LMS Web Interface

Opigno LMS is now installed and configured, it's time to access Opigno LMS web interface.

Open your web browser and type the URL http://example.com. You will be redirected to the following page:

Now, select your language and click on the Save and continue button. You should see the following page:

Next, provide your databasename, database username and password. Then, click on the Save and continue button. You should see the following page:

Next, provide your sitename, email, admin username and password. Then, click on the Save and continue button. You should see the following page:

Congratulations! you have successfully installed and configured Opigno LMS on Ubuntu 18.04 server. You can now host your own Learning Management System easily using Opigno LMS. Feel free to ask me if you have any questions.

Share this page:

0 Comment(s)