• Get In Touch
April 29, 2017

How to Install Chamilo CMS on Ubuntu 16.04

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server

Chamilo is a free and open source learning management software application that can be used to store and compose the study materials.

Chamilo allow us to create a virtual campus to create full online or semi-online learning.

Chamilo provides lots of features, some of them are listed below:

  1. Allow us to download, upload and hide some course content as per our need.
  2. Allow us to manage course and user based on various user’s profiles.
  3. Easily enable deadline based assignments.
  4. Allow us to generate reports in Excel and CSV formate.

In this tutorial, we will explain how to install Chamilo CMS on Ubuntu 16.04

Requirements

  • A server running Ubuntu 16.04 server.
  • A non root user with sudo privileges setup on your server.

Update the System

Before installing any packages, it is recommended to update your system with the latest version. You can do this by running the following command:

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

Once your system is up to date, you can proceed to install LAMP server.

Install LAMP Server

First, you will need to install Apache, PHP and MariaDB server on your system.

You can install them with the following command:

sudo apt-get install apache2 mariadb-server php7.0 -y

Once installation is completed, you will also need to install some required php modules. You can install them with the following command:

sudo apt-get install php7.0-curl php7.0-gd php7.0-mbstring php7.0-mysql libapache2-mod-php7.0 php7.0-mcrypt php7.0-bz2 php7.0-zip php7.0-json

Next, you will need to modify php.ini file:

sudo nano /etc/php/7.0/apache2/php.ini

Change the following lines:

date.timezone = 'America/New_York'
max_execution_time = 300
max_input_time = 600
memory_limit = 512M
post_max_size = 200M
upload_max_filesize = 200M
short_open_tag = Off
safe_mode = Off
magic_quotes_gpc = Off
magic_quotes_runtime = Off
session.cookie_httponly = On
extension = xapian.so

Save and close the file when you are finished, then start apache and mariadb service and enable them to start on boot time:

sudo systemctl start apache2
sudo systemctl start mysql
sudo systemctl enable apache2
sudo systemctl enable mysql

Once you are done, you can proceed to configure MariaDB database.

Configure MariaDB

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

sudo mysql_secure_installation

Answer all the questions as below:

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 you are done, log in to the MariaDB console with the following command:

mysql -u root -p

Enter your root password when prompt, then create a database for Chamilo:

MariaDB [(none)]>CREATE DATABASE chamilo;
Query OK, 1 row affected (0.00 sec)

Next, create a username and password for Chamilo with the following command:

MariaDB [(none)]>CREATE USER 'chamilouser'@'localhost' IDENTIFIED BY 'password';
Query OK, 1 row affected (0.00 sec)

Next, grant privileges to the Chamilo database with the following command:

MariaDB [(none)]>GRANT ALL PRIVILEGES ON chamilo.* TO 'chamilouser'@'localhost';
Query OK, 1 row affected (0.00 sec)

Next, you will need to run the FLUSH PRIVILEGES command so that the privileges table will be reloaded by MariaDB and we can use new credential:

MariaDB [(none)]>FLUSH PRIVILEGES;
Query OK, 1 row affected (0.00 sec)

Next, exit from the MariaDB console with the following command:

MariaDB [(none)]>\q

Once you are done, you can proceed to install Chamilo.

Install Chamilo

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

wget https://github.com/chamilo/chamilo-lms/archive/v1.10.0.zip

Once the download is completed, extract the downloaded file with the following command:

unzip v1.10.0.zip

Next, move the extracted directory to the apache web root directory:

sudo mv chamilo-lms-1.10.0/ /var/www/html/chamilo

Next, give proper permissions to the chamilo directory:

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

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

Configure Apache for Chamilo

Next, you will need to create a new virtual host directive in apache for Chamilo.

You can do this by creating chamilo.conf file inside /etc/apache2/sites-available/ directory:

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

Add the following lines:

<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/html/chamilo
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory /var/www/html/chamilo/>
Options FollowSymLinks
AllowOverride All
</Directory>
ErrorLog /var/log/apache2/chamilo-error_log
CustomLog /var/log/apache2/chamilo-access_log common
</VirtualHost>

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

sudo a2ensite chamilo.conf

Finally, restart the apache service for the changes to take effects:

sudo systemctl restart apache2

Access the Chamilo Web Interface

By default chamilo will be available on port 80. So open your web browser and type the URL http://your-domain.com, you should see the chamilo installation wizard in below image:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/657275482.png” alt=”” />

Click on the Install Chamilo button to start installation, you should see the following page:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/1240994363.png” alt=”” />

Choose the English language and click on the Next button, then confirm all the requirements and click on the New Installation button, you should see the following page:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/1618890122.png” alt=”” />

Next, accept the licence and click on the Next button, you should see the following page:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/908851187.png” alt=”” />

Here, provide database information and click on the Check database connection button, then click on the Next button. You should see the following page:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/1343743851.png” alt=”” />

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/475572941.png” alt=”” />

Here, provide admin credentials and your site details then click on the Next button, you should see the following page:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/2006636541.png” alt=”” />

Here, reviewing all the config settings then click on the Install chamilo button. Once installation has finished we will get a link to our new Chamilo installation as shown in below image:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/551760210.png” alt=”” />

Here, click on the Go to your newly created portal button, you will be redirected to Chamilo login page as shown in below image:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/1452711744.png” alt=”” />

Here, provide your admin credential and click on the Login button. After a successful login we will get the Chamilo dashboar as shown in below image:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/1257692976.png” alt=”” />

Thats it. You have successfully installed Chamilo on your Ubuntu 16.04 server.

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server

Share this Article!

Related Posts

Node.js Authentication – A Complete Guide with Passport and JWT

Node.js Authentication – A Complete Guide with Passport and JWT

Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will be avoided or at least […]

Node.js and MongoDB: How to Connect MongoDB With Node

Node.js and MongoDB: How to Connect MongoDB With Node

MongoDB is a document-oriented NoSQL database, which was born in 2007 in California as a service to be used within a larger project, but which soon became an independent and open-source product. It stores documents in JSON, a format based on JavaScript and simpler than XML, but still with good expressiveness. It is the dominant […]

Using MySQL with Node.js: A Complete Tutorial

Using MySQL with Node.js: A Complete Tutorial

Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you need to scale an application, […]

Node.Js Vs Django: Which Is the Best for Your Project

Node.Js Vs Django: Which Is the Best for Your Project

Django and NodeJs are two powerful technologies for web development, both have great functionality, versatile applications, and a great user interface. Both are open source and can be used for free. But which one fits your project best? NodeJs is based on JavaScript, while Django is written in Python. These are two equally popular technologies […]

Nodejs Vs PHP:  Which Works Best?

Nodejs Vs PHP: Which Works Best?

Before getting into the “battle” between Node.js and PHP we need to understand why the issue is still ongoing. It all started with the increased demand for smartphone applications, their success forcing developers to adapt to new back-end technologies that could handle a multitude of simultaneous requests. JavaScript has always been identified as a client-side […]