How to Install Chamilo on CentOS 7

How to Install Chamilo on CentOS 7

Spread the love

Chamilo is a free and open-source, PHP based learning management platform and content management system (CMS). Used by millions of students, organizations, governments, schools, and companies around the world, Chamilo is one of the most popular platforms of this type. In this tutorial, we will present you the steps for installing Chamilo on a CentOS 7 VPS.

Chamilo comes with a lot of features such as:
– Courses management
– User management, authentication, and enrollment
– 20 pedagogical tools (document management, assignments, announcements, tests, forum, wiki, surveys, etc..)
– Social learning network
– Standards implementations (SCORM 1.2, AICC, IMS/QTI, HotPotatoes, iCal)
– Training sessions management
– Availability timeframe for tests/exams
– CSV/Excel data import/export
and many more…

Prerequisites

– SSH access with root privileges
– CentOS 7 VPS with at least 1GB of RAM
– Apache version 2.2 or newer
– MySQL/MariaDB database server version 5 or newer
– PHP version 5.4 or newer with the following PHP modules:  php-mysqlnd php-zlib php-pcre php-xml php-json php-mcrypt php-iconv php-gd php-intl php-session

In this tutorial we will install all necessary prerequisites, including Apache, PHP version 7 and MariaDB.

Step 1. Login via SSH and update the system

Login to your CentOS 7 VPS via SSH as user root

ssh root@IP_Address -p Port_Number

and run the following command to update all installed packages

yum -y update

Step 2. Install Apache

Apache web server is available in the official CentOS 7 repository and it can be easily installed with the yum package manager

yum -y install httpd

Once the installation is completed, start the web server and enable it to automatically start upon server reboot.

systemctl start httpd
systemctl enable httpd

Install PHP

CentOS 7 is shipped with PHP 5.4 by default. This PHP version has reached the end of life and it is no longer maintained. We will show you how to install PHP 7 instead, from the Webtatic EL yum repository. Add the repository with the following command

yum -y install epel-release
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

Once you add the repository you can proceed with the PHP installation including the extensions required by Chamilo

yum -y install php70w php70w-common php70w-mysqlnd php70w-zlib php70w-pcre php70w-xml php70w-json php70w-mcrypt php70w-iconv php70w-gd php70w-intl php70w-session php70w-cli

verify that PHP 7 is properly installed

php -v
PHP 7.0.31 (cli) (built: Jul 20 2018 08:55:22) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies

Step 3. Install MariaDB

Chamilo requires an empty database, so we will have to install a database server. Install MariaDB database server by executing the following command

yum -y install mariadb

Start the server and enable it to start upon reboot

systemctl start mariadb
systemctl enable mariadb

Once the installation of the database server is finished, execute the mysql_secure_installation post-installation script, to set a password for the MySQL root user and implement some additional security recommendations.

Now, login to the MariaDB server and create a new database and user for the Chamilo installation

mysql -u root -p

MariaDB [(none)]> CREATE DATABASE chamilo;
MariaDB [(none)]> CREATE USER 'chamilo'@'localhost' IDENTIFIED BY 'PASSWORD';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON chamilo.* TO 'user'@'localhost';
MariaDB [(none)]> FLUSH PRIVILEGES
MariaDB [(none)]> exit

Replace PASSWORD with an actual strong password.

Step 4. Download and install Chamilo

Download the latest stable version of Chamilo from their official website, built for PHP version 7.

wget https://github.com/chamilo/chamilo-lms/releases/download/v1.11.8/chamilo-1.11.8-php7.zip

unpack the downloaded archive to the document root directory of your server

unzip chamilo-1.11.8-php7.zip -d /var/www/html/

Rename the directory where all Chamilo files are placed

cd /var/www/html
mv chamilo-1.11.8 chamilo

change the ownership of the Chamilo files

chown -R apache:apache chamilo

Step 5. Create Apache virtual host

If you want to access Chamilo with your domain name, you will have to create Apache virtual host for the domain

vi /etc/httpd/conf.d/invoiceninja.conf

ServerAdmin [email protected]
DocumentRoot /var/www/html/chamilo
ServerName domain.com
ServerAlias www.domain.com

Options +FollowSymlinks
AllowOverride All

ErrorLog /var/log/httpd/domain.com-error_log
CustomLog /var/log/httpd/domain.com-access_log common

Save the file and restart the web server for the changes to take effect

systemctl restart httpd

If you closely followed the steps in this tutorial, you will be able to navigate your web browser to http://domain.com and follow the installation wizard to complete the Chamilo installation.

For more details on how to use and configure Chamilo, please check their official documentation.


installing chamilo on centos 7 Of course, if you are one of our Linux server management client, you don’t have to Install Chamilo on your CentOS 7 VPS, simply ask our admins, sit back and relax. Our admins will Install Chamilo on CentOS 7 for you immediately.

PS. If you liked this post about How to Install Chamilo on CentOS 7, please share it with your friends on the social networks using the buttons below or simply leave a comment in the comments section. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *