How to Install Gibbon LMS on Ubuntu 20.04

Gibbon is a free and open-source school management system specially designed for teachers, students, parents and leaders. It helps teachers to find, contact and help their students. It allows teachers to plan, teach, collect, assess and return work in one streamlined process. It is an excellent and one-stop-shop efficient tool that makes all information available in one place. It comes with a simple web-based interface that helps teachers to access all student details on the go.

In this tutorial, we will show you how to install Gibbon LMS with Let's Encrypt SSL on Ubuntu 20.04 server.

Prerequisites

  • A server running Ubuntu 20.04.
  • A valid domain name pointed with your server IP.
  • A root password is configured the server.

Getting Started

First, it is recommended to update your system packages to the latest version. You can update them with the following command:

apt-get update -y

Once all the packages are updated, you can proceed to the next step.

Install Apache, MariaDB and PHP

Next, you will need to install the Apache webserver, MariaDB, PHP and other PHP extensions to your system. You can install all of them with the following command:

apt-get install apache2 mariadb-server php libapache2-mod-php php-common php-sqlite3 php-mysql php-gmp php-curl php-intl php-mbstring php-xmlrpc php-gd php-bcmath php-xml php-cli php-zip unzip git -y

Once all the packages are installed, edit the php.ini file and set desired values:

nano /etc/php/7.4/apache2/php.ini

Change the following lines with your required values:

memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = America/Chicago

Save and close the file when you are finished. Then, you can proceed to the next step.

Configure MariaDB Database

Next, you will need to create a database and user for Gibbon. First, login to MySQL shell with the following command:

mysql

Once login, create a database and user with the following command:

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

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

MariaDB [(none)]> GRANT ALL ON gibbondb.* TO 'gibbon'@'localhost' WITH GRANT OPTION;

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

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

Once your database is configured, you can proceed to the next step.

Install Gibbon

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

wget https://github.com/GibbonEdu/core/archive/v20.0.00.zip

Once the download is completed, you can unzip the downloaded file with the following command:

unzip v20.0.00.zip

Next, move the extracted directory to the Apache root directory with the following command:

mv core-20.0.00 /var/www/html/gibbon

Next, change the ownership and permission of the Gibbon with the following command:

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

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

Configure Apache for Gibbon

Next, you will need to configure Apache to serve the Gibbon. To do so, create an Apache virtual host configuration file with the following command:

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

Add the following lines:

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

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

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined
    
     <Directory /var/www/html/gibbon/>
            RewriteEngine on
            RewriteBase /
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^(.*) index.php [PT,L]
    </Directory>
</VirtualHost>

Save and close the file when you are finished. Then, enable the Gibbon virtual host by running the following command:

a2ensite gibbon.conf

Next, enable the Apache rewrite module and restart the Apache service to apply the chconfigurationg anges:

a2enmod rewrite
systemctl restart apache2

At this point, the Apache web server is configured to serve the Gibbon LMS. Once you are finished, you can proceed to the next step.

Access Gibbon Web Interface

Now, open you web browser and access the Gibbon web interface using the URL http://gibbon.example.com. You will be redirected to the following page:

System requirements

Check all system requirements, select English language and click on the Submit button. You should see the following page:

Database settings

Provide your database name, username, password and click on the Submit button. You should see the following page:

User account

Base URL

Organization settings

Provide your account configuration, system settings and organization settings then click on the Submit button. Once the installation has been completed, you should see the following page:

Installation finished

Next, click on go to your Gibbon homepage, you should see the Gibbon login page in the following page:

Gibbon Learning Management system

Provide your admin username, password and click on the Login button. You should see the Gibbon dashboard in the following page:

Lessons

Secure Gibbon with Let's Encrypt SSL

Next, it is recommended to secure your website with Let's Encrypt SSL. First, install the Certbot client using the following command:

apt-get install python3-certbot-apache -y

Once installed, run the following command to secure your website with Let's Encrypt SSL:

certbot --apache -d gibbon.example.com

You will be asked to provide your email and accept the term of service as shown below:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for gibbon.example.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/gibbon-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/gibbon-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/gibbon-le-ssl.conf

Next, select whether or not to redirect HTTP traffic to HTTPS as shown below:

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

Type 2 and hit Enter to install the Let's Encrypt SSL for your website:

Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/gibbon.conf to ssl vhost in /etc/apache2/sites-available/gibbon-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://gibbon.example.com

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=gibbon.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/gibbon.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/gibbon.example.com/privkey.pem
   Your cert will expire on 2020-10-23. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

Now, you can access the Gibbon LMS securely using the URL https://gibbon.example.com.

Conclusion

Congratulations! you have successfully installed and configured Gibbon LMS with Let's encrypt SSL on Ubuntu 20.04. You can now easily implement it in your school and explore the Gibbon for new functionalities and features. Feel free to ask me if you have any questions.

Share this page:

0 Comment(s)