Install Chamilo LMS on Ubuntu 20.04
Introduction
Chamilo is a free and open-source e-Learning Management System (LMS) and content management system based on PHP. It's used for online education and team collaboration by creating a virtual educational community for the students to access online courses. Some major features are:
- Courses and sessions management.
- User management, authentication, and enrollment.
- Data import/export to CSV/Excel format.
- Social network for learning purposes.
- Availability timeframe for tests/exams.
This article explains how to install Chamilo LMS on Ubuntu 20.04 server.
Prerequisites
- Deploy a fully updated Vultr Ubuntu 20.04 Server.
- Create a non-root user with sudo access.
1. Install Required Packages
Install all the required packages and modules needed by Chamilo LMS to run.
SSH to your server as a non-root user with sudo access.
Update the system package list to update all packages to the latest available versions.
$ sudo apt update
Install PHP 7.4 and more modules.
$ sudo apt install apache2 mysql-server php7.4 libapache2-mod-php7.4 php7.4-json php7.4-curl php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-common php7.4-sqlite3 php7.4-curl php7.4-intl php7.4-mbstring php7.4-gd php7.4-zip php7.4-imap php7.4-ldap php7.4-apcu php7.4-cli php7.4-zip wget unzip -y
List available time zones and choose your preference.
$ sudo timedatectl list-timezones
Edit the PHP configuration file.
$ sudo nano /etc/php/7.4/apache2/php.ini
Change the following values, and replace
Africa/Nairobi
with your timezone save and close the file. To search for a specific line, use Control+W, enter search phrase then press Enter.max_execution_time = 360 memory_limit = 512M upload_max_filesize = 100M date.timezone = Africa/Nairobi
Restart Apache2 service for all changes made to take effect.
$ sudo systemctl restart apache2
2. Create Chamilo LMS Database
Create an empty Chamilo LMS database that will be used in later steps for connecting to the application. All the highlighted names can be changed to your preferred names.
Log in to MySQL shell. At the password prompt, just press Enter to continue.
$ sudo mysql -u root -p
Create a database called
chamilo
.CREATE DATABASE chamilo;
Create a database user called
chamilouser
with a passwordStrongPassword
.CREATE USER 'chamilouser'@'localhost' IDENTIFIED BY 'StrongPassword';
Grant the user full access to the database.
GRANT ALL ON chamilo.* TO 'chamilouser'@'localhost' WITH GRANT OPTION;
Save the changes.
FLUSH PRIVILEGES;
Exit the shell.
exit;
3. Install Chamilo LMS
Download the latest version of Chamilo LMS. Find the newest version of this software on the official download page.
$ wget https://github.com/chamilo/chamilo-lms/releases/download/v1.11.16/chamilo-1.11.16.zip
Extract the downloaded files.
$ sudo unzip chamilo-1.11.16.zip
Create the installation directory
/var/www/html/chamilo
.$ sudo mkdir /var/www/html/chamilo
Move the extracted files to the installation directory.
$ sudo mv chamilo-1.11.16/* /var/www/html/chamilo
Change ownership of the installation directory.
$ sudo chown -R www-data:www-data /var/www/html/chamilo/
Change access permissions for the installation directory.
$ sudo chmod -R 755 /var/www/html/chamilo/
4. Configure Apache2
Create a new Apache configuration file called
chamilo.conf
.$ sudo nano /etc/apache2/sites-available/chamilo.conf
Then copy and paste the code below into the file. Finally, save and close the file.
<VirtualHost *:80> ServerAdmin admin@example.com DocumentRoot /var/www/html/chamilo ServerName example.com <Directory /var/www/html/chamilo/> Options FollowSymlinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
Disable Apache default configuration file.
$ sudo a2dissite 000-default.conf
Enable Chamilo LMS Apache configuration file.
$ sudo a2ensite chamilo.conf
Enable Apache rewrite mode.
$ sudo a2enmod rewrite
Restart Apache service.
$ sudo systemctl restart apache2
5. Access Chamilo LMS Web Interface
To access the Chamilo LMS Web Interface, go to your browser and visit http://Server_IP/
. For example:
http://192.0.2.10/
Conclusion
You have installed Chamilo LMS on your server. After confirming that all the required packages are installed, complete installation by setting up your site information, creating an administrator account, and connecting your application to the database. You can now access the dashboard and configure it to begin managing your online courses.