How to Install Chamilo E-Learning System on Ubuntu 18.04 LTS

Chamilo is a free, open source e-learning management system that is widely used for online learning and teamwork. This allows you to create a virtual campus environment to provide fully online and hybrid courses. Its main goal is to provide easy access to knowledge and education around the world. It is written in PHP and comes under the GNU / GPL license.

In this article, we will show you how to install Chamilo LMS on Ubuntu. Before proceeding with the installation, let’s look at some of the features of Chamilo:

  • Download, download and hide course content as required.
  • Course and user management based on various user profiles, such as teachers, students, administrators
  • User Management, Authentication, and Registration
  • Include deadlines for assignments.
  • Report generation in Excel and CSV format.
  • Supports mass user generation
  • Multilingual

We will use Ubuntu 18.04 LTS to explain the procedure mentioned in this article.

Background

Here is a list of prerequisites for installing Chamilo:

  • Apache2
  • MySQL or MariaDB
  • PHP and related modules

First we fulfill all the prerequisites, then install and configure Chamilo. To do this, follow these steps:

Step 1: Install Apache2

Make sure all packages are updated. To do this, launch the Terminal using Ctrl + Alt + T keyboard shortcuts, and then run the following command in it:

$ sudo apt update

Then install Apache2 by running the following command in the terminal:

$ sudo apt install apache2

After installing Apache2, run the following commands one after another to stop, start, and enable Apache services. turn on The command will allow Apache to always start at boot time.

$ sudo systemctl stop apache2.service

$ sudo systemctl start apache2.service

$ sudo systemctl enable apache2.service

Enable apache2 web service

To test Apache, open any web browser and in the address bar enter Http: // followed by host name or IP address your system and click To come in,

http://localhost

or

http:// IP-address

This way you will see the following Apache page by default.

Apache default webpage

Step 2: Install MariaDB Database Server

Chamilo requires an empty database to work. We can install MySQL or MariaDB database server. For this demonstration, we will use the MariaDB server. To install, run the following command in Terminal:

$ sudo apt-get install mariadb-server mariadb-client

Install MariaDB

After the MariaDB installation is complete, run the following commands one after another to stop, start, and enable Apache services. turn on The command will allow MariaDB to always start at boot time.

$ sudo systemctl stop mariadb.service

$ sudo systemctl start mariadb.service

$ sudo systemctl enable mariadb.service

Enable the MariaDB service to start when the server boots

MariaDB is not a safe default database. We can protect it by creating a root password and denying remote access. To do this, run the following command:

$ sudo mysql_secure_installation

When you execute the above command, it will offer different questions. Answer them as follows:

  • Enter the current password for root (enter no): Click To come in
  • Change root password? [Y/n]: Y
  • New password: enter password
  • Re-enter the new password: Reenter password
  • Delete anonymous users? [Y/n]: Y
  • Deny root login remotely? [Y/n]: Y
  • Delete the test database and access it? [Y/n]: Y
  • Reload privilege tables now? [Y/n]: Y

Secure installation of MariaDB

Now that MariaDB is installed, we can verify it by running the following command in Terminal:

$ sudo mysql -u root –p

Enter the password that you set above during setup. If the MariaDB server is successfully installed, you will see a welcome message, as shown in the screenshot below.

Database Login Verification

Step 3: Install PHP 7.2 and related modules

Now we need to install PHP and its related modules. PHP is not available in Ubuntu repositories by default, so we will install it from a third-party PPA repository. To do this, follow the next step:

In the Terminal, run the following command:

$ sudo apt-get install software-properties-common

set software properties-general

Then add the PPA by running this command:

$ sudo add-apt-repository ppa:ondrej/php

Install Ondrei PAP

After adding the PPA, update the local repository by running the command:

$ sudo apt update

Refresh Package Lists

Then run the following command to install PHP and its related modules:

$ sudo apt install 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-ldap php7.2-apcu php7.2-zip

Install php

Now we will configure the PHP settings. To do this, open the configuration file php.ini in the editor by executing the following command in Terminal. We use the Nano editor.

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

Update php.ini settings

Add lines to have the following configuration. You can use the keyboard shortcut to search for the following lines in the Nano editor. Ctrl + W,

file_uploads = On

allow_url_fopen = On

short_open_tag = On

memory_limit = 256M

upload_max_filesize = 100M

max_execution_time = 360

date.timezone = Add time zone

You can find your time zone in Ubuntu by typing timezonectl in the terminal.

After the setup is complete, save the file and exit.

Step 4. Restart Apache2.

So, PHP is configured, now we will restart Apache to reload the PHP configurations. To do this, run the following command in Terminal:

$ sudo systemctl restart apache2.service

Step 5: Testing PHP

Then we test the PHP settings using Apache and for this we will need to create phpinfo.php file in apache root directory / Var / www / html, To do this, run the following command:

$ sudo nano /var/www/html/phpinfo.php

Add the line below and save the file.

Now enter the following address in the address bar of your browser.

http://localhost/phpinfo.php

This way you will see the following default PHP page.

PHP test

Step 6: Create Chamilo Database

Now we need to log in to the MariaDB server and create a database for Chamilo. To enter, run the following command in Terminal:

$ sudo mysql -u root –p

When prompted for a password, enter the MariaDB root password.

Then run the following commands in the Terminal to create a new database, the database user and give the user full access to the database, respectively. replace chamilo, chamilouserdatabse_password and ‘user password with your own.

$ CREATE DATABASE chamilo;

$ CREATE USER 'chamilouser'@'localhost' IDENTIFIED BY 'databse_password;

$ GRANT ALL ON chamilo.* TO 'chamilouser'@'localhost' IDENTIFIED BY 'user_password' WITH GRANT OPTION;

$ FlUSH PRIVILEGES

$ EXIT

Create Chamilo Database

Step 7: Download and Install Chamilo LMS

Now run the following command in the terminal to load Chamilo:

$ cd /tmp && wget https://github.com/chamilo/chamilo-lms/releases/download/v1.11.6/chamilo-1.11.6-php7.zip

It will load the Chamilo settings into your current working directory.

Download Chamilo LMS

The setting will be in zip format. To unzip it, run the following command:

$ unzip chamilo-1.11.6-php7.zip

Extract the Chamilo Archive

Then we will need to transfer the extracted settings to the Apache root directory. To do this, run the following command:

$ sudo mv chamilo-1.11.6 /var/www/html/Chamilo

Move installation directory

Now change the root permission by running the following commands:

$ sudo chown -R www-data:www-data /var/www/html/chamilo/

$ sudo chmod -R 755 /var/www/html/chamilo/

Set permissions for files and folders

Step 8: Create an Apache Virtual Host

We will need to create an Apache virtual host directive for our Chamilo LMS site. This will help us determine the domain, ports, alias, and some other configurations. To do this, run the following command in Terminal to create a new configuration file. Chamilo.conf:

$ sudo nano /etc/apache2/sites-available/chamilo.conf

Now copy and paste the content below, replace example.com after ServerName with your own domain name or IP address.



ServerAdmin [email protected]

DocumentRoot /var/www/html/chamilo

ServerName example.com



Options FollowSymlinks

AllowOverride All

Require all granted



ErrorLog ${APACHE_LOG_DIR}/error.log

CustomLog ${APACHE_LOG_DIR}/access.log combined

Now click Ctrl + O save and Ctrl + X exit the file.

Step 9: Turn on the site and the site rewrite module LMS Chamilo

After creating the virtual host directive, we need to enable it. Run the command below to do this:

$ sudo a2ensite chamilo.conf

Then enable the Apache Rewrite module:

$ sudo a2enmod rewrite

Finally restart the Apache web server.

$ sudo systemctl restart apache2.service

Turn on site

Step 10: Access the Chamilo Web Interface

Since we have configured and configured everything necessary for Chamilo LMS, now we will proceed to install it via the Internet. To do this, open any web browser and open the following address:

http://ip-address

or

http://domain/

After entering the above address, you will see the Chamilo installation page. Click on the set Chamilo button to start the installation process.

Access Chamilo Web Interface

Select the installation language from the drop-down menu and click following,

Choose language

On the next screen, you will see the requirements that are required for a full-featured LMS Chamilo. Make sure all requirements are met. If something is missing, you will see them in orange and you can install them later. Press on New installation button at the bottom of the web page to go to the next step. Check system requirements

Now you will see the license agreement page, click on I accept I agree check the box and click the next button.

Accept License Agreement

We will now configure the database to connect Chamilo to the MariaDB database in order to store and retrieve data. In the fields, add localhost as the database host, 3306 as the port number. Then, in the last three fields, enter the database user login, password and database name, respectively, that you installed earlier.

When you’re done, click on Check database connectionIf there is no error, go to the next step by clicking following button.

MySQL database settings

Now configure the administrator account by entering the necessary administrator credentials.

Configuration settings

Check the settings and then click Install Chamilo button.

Install Chamilo

Wait a while until the installation is complete and you will see the following screen. Press on Go to your newly created portal Complete the installation of the wizard.

Installation was successful

You will now see the next Chamilo login page. Enter the required credentials and click on Log in button.

Chamilo website

You will now be directed to the Chamilo toolbar, as shown in the screenshot below.

Chamilo dashboard

Finally, we successfully installed and configured Chamilo LMS in our Ubuntu 18.04 LTS. It is a user-friendly web-based learning management system that facilitates sharing and collaboration. Installing and configuring the Chamilo LMS was a lengthy but simple procedure. I hope this is useful when you need to set up an e-learning environment.

How to Install Chamilo E-Learning System on Ubuntu 18.04 LTS

Sidebar