Google Cloud Compute Engine

Install ILIAS E-Learning LMS on Ubuntu – Google Cloud

Disclosure: This post may contain affiliate links, which means we may receive a commission if you click a link and purchase something that we recommended.

Pinterest LinkedIn Tumblr

Install ILIAS E-Learning LMS on Ubuntu 16.04 with Google Cloud Platform. This guide explains how to install and setup ILIAS Learning Management System on Google Cloud Platform with PHP 7.1, Apache and MySQL 5.7

ILIAS is a free open source powerful learning management solution for large businesses, universities, schools to create tailored, individual learning scenarios very easily.


System Requirements for ILIAS

You can choose 3.75 GB RAM for your Compute Engine Instance with Ubuntu 16.04. This tutorial is tested using this machine type with 50 GB Disk space.

You can also install ILIAS on other Cloud Platforms with this same setup. Some are listed below.

Once you have your Compute Engine Instance created and DNS is pointed to Google Cloud, you can proceed to start installing ILIAS.

Install Apache

Install Apache using the following command.

sudo apt-get install apache2

Enable Firewall and Fail2Ban

Enable UFW for SSH port, HTTP port and HTTPS port.

sudo ufw allow OpenSSH
ufw allow 'Apache Full'

Now you can enable Firewall.

sudo ufw enable

For additional securities you can install Fail2Ban

sudo apt-get install fail2ban

Start Fail2Ban

sudo service fail2ban start

Install PHP 7.1

Now you can install PHP 7.1 and the required extensions.

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install libapache2-mod-php7.1 php7.1-gd php7.1-mysql php7.1-mbstring php-xml php7.1-xml

Once the installation is complete you can configure PHP ini settings for ILIAS.

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

Modify the values to the ones below.

max_execution_time = 600
memory_limit = 512M
display_errors = Off
post_max_size = 256M
upload_max_filesize = 256M
max_input_vars = 10000
session.gc_probability = 1
session.gc_divisor = 100
session.gc_maxlifetime = 14400
session.hash_function = 0
session.save_handler = files
session.cookie_secure = On
allow_url_fopen = 1

Install MySQL and create Database for ILIAS

Now it’s time to create a database for ILIAS.

Install MySQL server

sudo apt-get install mysql-server

Setup a root password when prompted.

Login to MySQL and create a database for ILIAS.

mysql -u root -p

Enter your root password and execute the following commands to create a database and assign the user to the database.

CREATE DATABASE ilias_db CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'ilias_user'@'localhost' IDENTIFIED BY 'some_password';
GRANT ALL PRIVILEGES ON ilias_db.* TO 'ilias_user'@'localhost';

Remember the database name, username and password you just created.

Install other Dependencies

You need to install zip, unzip, imagemagick and Java

sudo apt-get install zip unzip imagemagick openjdk-8-jdk

Download ILIAS

Once Apache, PHP 7.1, MySQL and all other dependencies are installed you can download ILIAS into the webroot directory.

cd /var/www/html/
sudo git clone ilias
sudo chmod -R 755 ilias
sudo chown -R www-data:www-data ilias

Create a new directory outside of webspace and setup correct permissions for the data directory outside of webspace.

sudo mkdir /var/www/html/extras
sudo chmod -R 777 /var/www/html/extras 

You will need to add this path during the installation of ILIAS from your browser.

Now ILIAS is downloaded and permissions are setup.

Create V-Host Config for ILIAS

First you need to disable the default virtual host configuration.

sudo a2dissite 000-default

Create new configuration.

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

Paste the following in the file.

<VirtualHost *:80>
    ServerAdmin [email protected]

    DocumentRoot /var/www/html/ilias

    <Directory /var/www/html/ilias>
        Options FollowSymLinks
        AllowOverride All
        Require all granted

    ErrorLog ${APACHE_LOG_DIR}/ilias_error.log 
    CustomLog ${APACHE_LOG_DIR}/ilias_access.log combined 

Hit Ctrl + X followed by Y and Enter to save the file.

Enable the configuration

sudo a2ensite ilias.conf

Enable Apache rewrite module

sudo a2enmod rewrite

Restart Apache.

sudo systemctl restart apache2

Setup Free SSL for ILIAS

Now you can install SSL to secure your website.

HTTPS is a protocol for secure communication between a server (instance) and a client (web browser). Due to the introduction of Let’s Encrypt, which provides free SSL certificates, HTTPS are adopted by everyone and also provides trust to your audiences.

sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-apache

Now we have installed Cert bot by Let’s Encrypt for Ubuntu 18.04, run this command to receive your certificates.

sudo certbot --apache -m [email protected] -d -d

Select all the domains you need to receive the certificate and hit Enter

The Cert bot client will automatically generate the new certificate for your domain.

Now you will be asked to create a redirection to https

Select the appropriate option and hit Enter

Install ILIAS

Now visit your domain name on your browser.

Follow the on screen instructions to install ILIAS.

For data directory outside the webspace you can enter the directory we have created (/var/www/html/extras ).

For MySQL Database type you can choose InnoDB Engine.

Install ILIAS on Google Cloud

Get your Professional Google Cloud Architect certificate with this easy to learn course now.


In this guide you have learned how to install Apache, PHP 7.1, MySQL, ILIAS on Google Compute Engine.

Write A Comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.