How to Install Chamilo 1.11.8 on Ubuntu 18.04 LTS

Chamilo is a free and open source learning management system (LMS) which is widely used for online education and team collaboration all around the world.

In this article, I will show you how to deploy the latest stable release of Chamilo on an Ubuntu 18.04 LTS server instance.

Prerequisites

  • A fresh Vultr Ubuntu 18.04 LTS x64 server instance with sufficient memory, 8GB or more is recommended in production. Say its IPv4 address is 203.0.113.1.
  • A sudo user.
  • The server instance has been updated to the latest stable status. See details here.
  • A domain chamilo.example.com being pointed to the server instance mentioned above.

Modify the UFW firewall rules

In production, you need to modify UFW firewall rules in order to allow only inbound TCP traffic on the SSH, HTTP, and HTTPS ports:

sudo ufw allow in ssh
sudo ufw allow in http
sudo ufw allow in https
sudo ufw enable

Install Apache 2.4

On Ubuntu 18.04 LTS, you can use APT to install the latest stable release of Apache as follows:

sudo apt install -y apache2

Remove the pre-set Apache welcome page:

sudo mv /var/www/html/index.html /var/www/html/index.html.old

Prohibit Apache from exposing files and directories within the web root directory, /var/www/html, to visitors:

sudo cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf.bak
sudo sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/apache2/apache2.conf

Enable the Apache Rewrite module:

sudo a2enmod rewrite

Start the Apache service and make it auto-start on every system boot:

sudo systemctl start apache2.service
sudo systemctl enable apache2.service

Install and secure MariaDB 10.3 series

Install the latest stable release of MariaDB:

sudo apt install -y software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirrors.accretive-networks.net/mariadb/repo/10.3/ubuntu bionic main'
sudo apt update
sudo apt install -y mariadb-server

During the installation, you will be prompted to setup a new password for the MariaDB root user. For security purposes, make sure to input a strong password here.

Start the MariaDB service and make it auto-start on every system boot:

sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

Secure MariaDB:

sudo /usr/bin/mysql_secure_installation

When prompted, reply to each question on the screen as follows:

Enter current password for root (enter for none): your-MariaDB-root-password
Change the 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

Install required PHP 7.2 packages

In order to get greater performance on the Chamilo site, it's recommended to install the latest PHP 7.2 packages rather than legacy PHP 5.x packages. Currently, you can use a third-party PPA repo to install required PHP 7.2 packages as follows.

Install the ondrej/php PPA repo, and then update the system:

sudo add-apt-repository -y ppa:ondrej/php
sudo apt update
sudo apt upgrade -y
sudo apt autoremove -y

Install required PHP 7.2 packages:

sudo apt install -y php7.2 php7.2-opcache php7.2-cli php7.2-curl php7.2-common php7.2-gd php7.2-intl php7.2-mbstring php7.2-mysql libapache2-mod-php7.2 php7.2-soap php7.2-xml php7.2-xmlrpc php7.2-zip php7.2-ldap php-apcu-bc

Backup and edit the Apache-oriented PHP config file:

sudo cp /etc/php/7.2/apache2/php.ini /etc/php/7.2/apache2/php.ini.bak
sudo sed -i 's#;date.timezone =#date.timezone = America/Los_Angeles#' /etc/php/7.2/apache2/php.ini

Note: When working on your own server instance, make sure to replace the example timezone value America/Los_Angeles with your own one. You can find all of the supported timezone values here.

Install Chamilo

Having the LAMP stack in place, it's now time to deploy the Chamilo LMS. You will need to setup a dedicated MariaDB database for Chamilo, prepare Chamilo LMS files, fine tune PHP 7.2 settings, setup an Apache virtual server, finish the installation in a web browser, and execute post-installation safety measures.

Log into the MariaDB shell as root:

mysql -u root -p

In the MariaDB shell, input the following statements:

CREATE DATABASE chamilo;
CREATE USER 'chamilouser'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON chamilo.* TO 'chamilouser'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;

Note: For security purposes, be sure to replace the database name chamilo, the database username chamilouser, and the password yourpassword with your own ones.

Prepare the Chamilo LMS files

Download the latest stable release of Chamilo from the Chamilo GitHub repo. Be sure to choose the PHP 7.x-oriented release:

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

Extract all of the Chamilo files to the /opt directory:

sudo tar -zxvf chamilo-1.11.8-php7.tar.gz -C /opt

In order to facilitate daily use and potential updates, create a symbolic link, which is pointing to the /opt/chamilo-1.11.8-php7 directory, in the Apache web root directory /var/www/html:

sudo ln -s /opt/chamilo-1.11.8-php7 /var/www/html/chamilo

Modify the ownership of all Chamilo files to the www-data user and the www-data group:

sudo chown -R www-data:www-data /opt/chamilo-1.11.8-php7

Fine tune PHP 7.2 settings for Chamilo

Use the vi editor to open the same PHP config file we edited earlier:

sudo vi /etc/php/7.2/apache2/php.ini

Find the following lines, respectively:

session.cookie_httponly =
upload_max_filesize = 2M
post_max_size = 8M

Replace them with the following:

session.cookie_httponly = 1
upload_max_filesize = 100M
post_max_size = 100M

Save and quit:

:wq!

Setup an Apache virtual server for Chamilo LMS

Use the following commands to setup an Apache virtual host for your Chamilo LMS site:

cat <<EOF | sudo tee /etc/apache2/sites-available/chamilo.conf
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/chamilo
ServerName chamilo.example.com
ServerAlias example.com
<Directory />
AllowOverride All
Require all granted
</Directory>
<Directory /var/www/html/chamilo>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/apache2/chamilo.example.com-error_log
CustomLog /var/log/apache2/chamilo.example.com-access_log common
</VirtualHost>
EOF

Note: Be sure to replace all occurences of example.com with your actual domain.

Use a new symbolic link to replace the default link file in the /etc/apache2/sites-enabled directory:

sudo rm /etc/apache2/sites-enabled/000-default.conf
sudo ln -s /etc/apache2/sites-available/chamilo.conf /etc/apache2/sites-enabled/

Restart the Apache service to put all of your modifications into effect:

sudo systemctl restart apache2.service

Finish the installation in a web browser

Point your favorite web browser to http://chamilo.example.com, and you will be brought into the Chamilo installation wizard. Click the Install Chamilo button to move on. The following section will walk you through the installation process:

  • Step 1 - Installation Language: Choose the language you'd like to use, such as English, and then click the Next button.
  • Step 2 – Requirements: Make sure that all mandatory requirements have been met, and then click the New installation button.
  • Step 3 – Licence: You need to review the GNU General Public licence (GPL), select the checkbox next to the I agree sentence, fill in all of the contact info fields, and then click the Next button to move on.
  • Step 4 – MySQL database settings: Input the database credentials we setup earlier and then click the Check database connection button to verify them. Click the Next button to move on.
  • Step 5 – Config settings: Make sure to modify the pre-set administrator password, fill in the other fields according to your business plan, and then click the Next button to move on.
  • Step 6 – Last check before install: Review all of the settings and then click the Install Chamilo button to start the web installation.
  • Step 7 – Installation process execution: When Chamilo is successfully installed, click the Go to your newly created portal. button to finish the web installation wizard.

Execute post-installation safety measures

In addition, two post-installation safety measures you need to take are listed below:

sudo chmod -R 0555 /var/www/html/chamilo/app/config
sudo rm -rf /var/www/html/chamilo/main/install


Leave a Comment

Cómo instalar Vtiger CRM Open Source Edition en CentOS 7

Cómo instalar Vtiger CRM Open Source Edition en CentOS 7

Aprende cómo instalar Vtiger CRM, una aplicación de gestión de relaciones con el cliente, en CentOS 7 para aumentar tus ventas y mejorar el servicio al cliente.

Cómo instalar el servidor Counter-Strike 1.6 en Linux

Cómo instalar el servidor Counter-Strike 1.6 en Linux

Esta guía completa le mostrará cómo configurar un servidor Counter-Strike 1.6 en Linux, optimizando el rendimiento y la seguridad para el mejor juego. Aprende los pasos más recientes aquí.

Cómo instalar LiteCart Shopping Cart Platform en Ubuntu 16.04

Cómo instalar LiteCart Shopping Cart Platform en Ubuntu 16.04

LiteCart es una plataforma de carrito de compras gratuita y de código abierto escrita en PHP, jQuery y HTML 5. Es un software de comercio electrónico simple, liviano y fácil de usar.

Cómo instalar MODX Revolution en un CentOS 7 LAMP VPS

Cómo instalar MODX Revolution en un CentOS 7 LAMP VPS

¿Usando un sistema diferente? MODX Revolution es un sistema de gestión de contenido (CMS) de nivel empresarial rápido, flexible, escalable, gratuito y de código abierto escrito i

Instalación de McMyAdmin en Ubuntu 14.10

Instalación de McMyAdmin en Ubuntu 14.10

McMyAdmin es un panel de control del servidor de Minecraft utilizado para administrar su servidor. Aunque McMyAdmin es gratuito, hay varias ediciones, algunas de las cuales son pai

Configurar un servidor TeamTalk en Linux

Configurar un servidor TeamTalk en Linux

TeamTalk es un sistema de conferencia que permite a los usuarios tener conversaciones de audio / video de alta calidad, chat de texto, transferir archivos y compartir pantallas. Es yo

How to Install and Configure CyberPanel on Your CentOS 7 Server

How to Install and Configure CyberPanel on Your CentOS 7 Server

Using a Different System? Introduction CyberPanel is one of the first control panels on the market that is both open source and uses OpenLiteSpeed. What thi

Instalar Grafana en Ubuntu 16.04 LTS

Instalar Grafana en Ubuntu 16.04 LTS

¿Usando un sistema diferente? Introducción Grafana es un software de código abierto que transforma múltiples feeds de sistemas como Graphite, Telegraf, an

Instalar phpBB con Apache en Ubuntu 16.04

Instalar phpBB con Apache en Ubuntu 16.04

PhpBB es un programa de tablón de anuncios de código abierto. Este artículo le mostrará cómo instalar phpBB en la parte superior de un servidor web Apache en Ubuntu 16.04. Fue escrito

Cómo instalar Foreman en Ubuntu 16.04 LTS

Cómo instalar Foreman en Ubuntu 16.04 LTS

¿Usando un sistema diferente? Foreman es una herramienta gratuita y de código abierto que lo ayuda con la configuración y administración de servidores físicos y virtuales. Forema

Configurar un usuario no root con acceso a Sudo en Ubuntu

Configurar un usuario no root con acceso a Sudo en Ubuntu

Tener un solo usuario, que es root, puede ser peligroso. Así que arreglemos eso. Vultr nos brinda la libertad de hacer lo que queramos con nuestros usuarios y nuestros servidores.

Install eSpeak on CentOS 7

Install eSpeak on CentOS 7

Using a Different System? ESpeak can generate text-to-speech (TTS) audio files. These can be useful for many reasons, such as creating your own Turin

Cómo instalar Thelia 2.3 en CentOS 7

Cómo instalar Thelia 2.3 en CentOS 7

¿Usando un sistema diferente? Thelia es una herramienta de código abierto para crear sitios web de comercio electrónico y administrar contenido en línea, escrito en PHP. Código fuente de Thelia i

Instalación de Fuel CMS en Ubuntu 16.04 LTS

Instalación de Fuel CMS en Ubuntu 16.04 LTS

¿Usando un sistema diferente? Fuel CMS es un sistema de gestión de contenido basado en CodeIgniter. Su código fuente está alojado en GitHub. Esta guía le mostrará cómo t

Cómo instalar Couch CMS 2.0 en un VPS LAMP Debian 9

Cómo instalar Couch CMS 2.0 en un VPS LAMP Debian 9

¿Usando un sistema diferente? Couch CMS es un sistema de gestión de contenido (CMS) simple y flexible, gratuito y de código abierto que permite a los diseñadores web diseñar

Monitoree sus dispositivos usando LibreNMS en CentOS 7

Monitoree sus dispositivos usando LibreNMS en CentOS 7

¿Usando un sistema diferente? LibreNMS es un completo sistema de monitoreo de red de código abierto. Utiliza SNMP para obtener los datos de diferentes dispositivos. Una variedad

Cómo configurar la optimización TCP en Linux

Cómo configurar la optimización TCP en Linux

Introducción ¿Tiene problemas con la conectividad cuando los visitantes de otros países acceden a su sitio web? Preguntándose por qué la velocidad de descarga de su extranjero

Cómo implementar Ghost v0.11 LTS en Ubuntu 16.04

Cómo implementar Ghost v0.11 LTS en Ubuntu 16.04

¿Usando un sistema diferente? Ghost es una plataforma de blogs de código abierto que ha estado ganando popularidad entre los desarrolladores y usuarios comunes desde su 201

Cómo instalar Pip en Linux

Cómo instalar Pip en Linux

Pip es una herramienta para administrar paquetes de Python. El uso de un administrador de paquetes permite una gestión eficiente de su servidor. En este tutorial, explicaré cómo t

Cómo instalar Cacti 1.1 en CentOS 7

Cómo instalar Cacti 1.1 en CentOS 7

Cacti es una herramienta de gráficos y monitoreo de red de código abierto y libre escrita en PHP. Con la ayuda de RRDtool (herramienta de base de datos Round-Robin), Cacti se puede usar t

ZPanel y Sentora en CentOS 6 x64

ZPanel y Sentora en CentOS 6 x64

ZPanel, un panel de control de alojamiento web popular, se bifurcó en 2014 a un nuevo proyecto llamado Sentora. Aprende a instalar Sentora en tu servidor con este tutorial.

Cómo instalar Vtiger CRM Open Source Edition en CentOS 7

Cómo instalar Vtiger CRM Open Source Edition en CentOS 7

Aprende cómo instalar Vtiger CRM, una aplicación de gestión de relaciones con el cliente, en CentOS 7 para aumentar tus ventas y mejorar el servicio al cliente.

Cómo instalar el servidor Counter-Strike 1.6 en Linux

Cómo instalar el servidor Counter-Strike 1.6 en Linux

Esta guía completa le mostrará cómo configurar un servidor Counter-Strike 1.6 en Linux, optimizando el rendimiento y la seguridad para el mejor juego. Aprende los pasos más recientes aquí.

¿Puede la IA luchar con un número cada vez mayor de ataques de ransomware?

¿Puede la IA luchar con un número cada vez mayor de ataques de ransomware?

Los ataques de ransomware van en aumento, pero ¿puede la IA ayudar a lidiar con el último virus informático? ¿Es la IA la respuesta? Lea aquí, sepa que la IA es una bendición o una perdición

ReactOS: ¿Es este el futuro de Windows?

ReactOS: ¿Es este el futuro de Windows?

ReactOS, un sistema operativo de código abierto y gratuito, está aquí con la última versión. ¿Puede satisfacer las necesidades de los usuarios de Windows de hoy en día y acabar con Microsoft? Averigüemos más sobre este estilo antiguo, pero una experiencia de sistema operativo más nueva.

Manténgase conectado a través de la aplicación de escritorio WhatsApp 24 * 7

Manténgase conectado a través de la aplicación de escritorio WhatsApp 24 * 7

Whatsapp finalmente lanzó la aplicación de escritorio para usuarios de Mac y Windows. Ahora puede acceder a Whatsapp desde Windows o Mac fácilmente. Disponible para Windows 8+ y Mac OS 10.9+

¿Cómo puede la IA llevar la automatización de procesos al siguiente nivel?

¿Cómo puede la IA llevar la automatización de procesos al siguiente nivel?

Lea esto para saber cómo la Inteligencia Artificial se está volviendo popular entre las empresas de pequeña escala y cómo está aumentando las probabilidades de hacerlas crecer y dar ventaja a sus competidores.

La actualización complementaria de macOS Catalina 10.15.4 está causando más problemas que resolver

La actualización complementaria de macOS Catalina 10.15.4 está causando más problemas que resolver

Recientemente, Apple lanzó macOS Catalina 10.15.4, una actualización complementaria para solucionar problemas, pero parece que la actualización está causando más problemas que conducen al bloqueo de las máquinas Mac. Lee este artículo para obtener más información

13 Herramientas comerciales de extracción de datos de Big Data

13 Herramientas comerciales de extracción de datos de Big Data

13 Herramientas comerciales de extracción de datos de Big Data

¿Qué es un sistema de archivos de diario y cómo funciona?

¿Qué es un sistema de archivos de diario y cómo funciona?

Nuestra computadora almacena todos los datos de una manera organizada conocida como sistema de archivos de diario. Es un método eficiente que permite a la computadora buscar y mostrar archivos tan pronto como presiona buscar.