💾 Archived View for gemlog.blue › users › gogoblue › 1639825768.gmi captured on 2023-11-04 at 17:35:06. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-01-08)

-=-=-=-=-=-=-

ILIAS is a widespread open-source learning platform (Learning Management System, LMS) from Germany [1]. For a customer I'm supporting a few ILIAS 6 installations and recently we decided to set up ILIAS 7 for the next project. That was a mistake, ILIAS 7 is not ready for prime-time despite its 7.5 version number. If you need PDF certificates, stay with ILIAS 6. See the end of the entry for a rant with a little more details.

[1] ILIAS homepage

Setting up ILIAS 7

Hardware requirements

You need hardware that is able to run a somewhat fatter LAMP stack. ILIAS itself suggests two ② cores, four (4) GB or RAM, 80 GB of storage. As always, more is better. And if you have many users on the platform (> 50) you might need even more. ILIAS is slow anyhow.

Preparing the LAMP stack

Set up the GNU/Linux server

1. Rent a machine with or install Ubuntu 20.04 (Debian 11 is also fine, but the walkthrough is based off Ubuntu 20.04)

2. ssh onto the new machine

3. I like to disable cloud-init and snap

$ cd /etc/cloud
$ touch cloud-init.disable

$ systemctl disable snapd.service
$ systemctl disable snapd.socket
$ systemctl disable snapd.seeded
$ systemctl disable snapd.snap-repair.timer

or

$ sudo apt-get remove --purge snapd

4. Set the runlevel target to multi-user

$ systemctl set-default multi-user.target

5. Now update the machine

$ sudo apt-get update && apt-get dist-upgrade

Install the AMP part

1. Install base packages (and a few required packages that are mentioned across the documentation)

apt-get install apache2 mysql-server php libapache2-mod-php php-mysql php-curl php-xmlrpc php-soap php-ldap \
php-xml php-gd php-zip php-mbstring php-tcpdf wkhtmltopdf ffmpeg mimetex zip unzip imagemagick openjdk-8-jdk git

2. Enable rewrite support in Apache2

$ sudo a2enmod rewrite

3. Put a file with phpinfo() in the webroot and take a look at it.

4. Adapt your php.ini settings. Copy and paste the following to the end of /etc/mysql/my.cnf

; Set at least (more is allowed)
max_execution_time = 600
memory_limit = 512M
post_max_size = 256M
upload_max_filesize = 256M
; How many GET/POST/COOKIE input variables may be accepted
max_input_vars = 10000

; choose a non-zero value for session.gc_probability, otherwise old session data will not be deleted
session.gc_probability = 1
session.gc_divisor = 100
session.gc_maxlifetime = 14400
session.hash_function = 0
session.cookie_httponly = On
session.save_handler = files ; for ILIAS setup, ILIAS installations override this
; If you installation is served via HTTPS also use:
session.cookie_secure = On

; for chat server since ILIAS 4.2
allow_url_fopen = 1

error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT ; PHP 5.4.0 and higher
display_errors = Off

5. Restart Apache2 and check again your phpinfo if the settings were adapted.

6. Remove the phpinfo file.

7. Set a password for the root user.

8. Configure a database for ILIAS. First configure the database server itself

[mysqld]
#innodb_dedicate_server=On # Only use if nothing else is run on the server, seriously!
innodb_buffer_pool_size=2G
table_open_cache=500
join_buffer_size=256K
# query_cache_size=32M # ignore the documentation, this option is deprecated as of MySQL 8.0.3

Restart your database server and set up a database.

$ mysql -u root -p

then enter

CREATE DATABASE ilias CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'ilias'@'localhost' IDENTIFIED BY 'fancyDatabasePassword';
GRANT LOCK TABLES on *.* TO 'ilias'@'localhost';
GRANT ALL PRIVILEGES ON ilias.* TO 'ilias'@'localhost';
FLUSH PRIVILEGES;

If you see errors in this step, you most likely need to disable STRICT_MODE. STRICT_MODE is off by default since MySQL 5.8.

Set up ILIAS 7

1. Start with creating a few directories

$ mkdir -p /var/www/files /var/www/logs /var/www/html/ilias

2. Create a vhost configuration for Apache2 in /etc/apache2/sites-available

$ sudo vim /etc/apache2/sites-available/ilias.conf

and create a simple vhost configiration

<VirtualHost FQDN:80>
	ServerAdmin webmaster@example.com

	DocumentRoot /var/www/html/ilias
	<Directory /var/www/html/ilias>
		Options +FollowSymLinks -Indexes
		AllowOverride All
		Require all granted
	</Directory>

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	ErrorLog /var/log/apache2/error.log
	CustomLog /var/log/apache2/access.log combined
</VirtualHost>

Make sure to set the fully qualified domain name, so that later Let's Encrypt's certbot will work.

3. Enable the new vhost config and disable the old default config.

4. Change to the ILIAS directory

cd /var/www/html/ilias

5. Get ILIAS from github:

$ git clone https://github.com/ILIAS-eLearning/ILIAS.git . --single-branch

This will take a few minutes and copy all ILIAS files from github.

6. Now install the PHP package manager "composer". Just run this little script on the commandline

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

or get it directly from getcomposer.org [2]. After downloading move the executable into your path, e.g.

$ mv composer.phar /usr/local/bin/composer

You may use the packaged composer from Ubuntu, but it's an older version and it will complain a lot whenever you use it.

7. Update the PHP packages by running

composer install --no-dev

or, if you are running as root,

composer install --no-dev --no-scripts --no-plugins

This again takes a few minutes.

8. Now we have to create a configuration file for the ILIAS setup. Put it somewhere outside webroot, e.g /var/www/ilias-config.json. It is a JSON formatted file and looks like this:

{
	"common" : {
		"client_id" : "myilias"
	},
	"database" : {
		"user" : "ilias",
		"password" : "fancyDatabasePassword"
	},
	"filesystem" : {
		"data_dir" : "/var/www/files"
	},
	"http" : {
		"path" : "http://FQDN"
	},
	"language" : {
		"default_language" : "de",
		"install_languages" : ["de"]
	},
	"logging" : {
		"enable" : true,
		"path_to_logfile" : "/var/www/logs/ilias.log",
		"errorlog_dir" : "/var/www/logs/"
	},
	"systemfolder" : {
		"contact" : {
			"firstname" : "Björn",
			"lastname" : "Janßen",
			"email" : "bjoern.janssen+gemini@caboja.com"
		}
	},
	"utilities" : {
		"path_to_convert" : "/usr/bin/convert",
		"path_to_zip" : "/usr/bin/zip",
		"path_to_unzip" : "/usr/bin/unzip"
	}
}

Adapt to your need, esp. make sure that the client_id is set, the FQDN is correct and that all the paths exist.

9. Correct the ownership of the different ILIAS directories. If you followed this recipe, this will do:

$ sudo chown -R www-data:www-data /var/www

10. This is the step where we actually install ILIAS 7. Make sure you are in /var/www/html/ilias and execute the installation script:

$ php setup/setup.php install /var/www/ilias-config.json

This step can take a good deal of time and I'm talking of 10s of minutes. It indicates a configuration problem (check MySQL!) or just not enough oomph on your server. Just give it time.

11. When the installation is finished, you have to chown the ILIAS directories again, see step 9.

12. ILIAS is now available on your FQDN. Initial login is "root" with password "homer" (something that is not mentioned in the documentation, again)

[2] GetComposer.org

Setting up the Java RPC server

This is a weird thing. The Java RPC server is supposedly needed to run the PDF builder and the Lucene search engine. If you want Lucene, you have to configure the Java RPC server. But if you want PDF generation, it works without the Java RPC server. At least you can create the overview PDFs from tests and so. You cannot create learning certificates. Then again, you can't create them even if the Java RPC server is running. Go figure. Anyhow, here is how to configure the Java RPC server.

1. Change to the working directory

$ cd /var/www/html/ilias/Services/WebSercvices/RPC/lib

2. You'll now see an ilServer.jar and an ilServer.properties file.

3. The ilServer.properties file is an ini-style file. Change it to reflect this:

[Server]
IpAddress = 127.0.0.1
Port = 11111
IndexPath = /var/www/html/ilias/data
LogFile = /var/www/logs/ilServer.log
LogLevel = warn
NumThreads = 1
RamBufferSize = 256
IndexMaxFileSizeMB = 512

[Client1]
ClientId = myilias
NicID = 0
IliasIniPath = /var/www/html/ilias/ilias.ini.php

Make sure the paths are correct and exist. The ClientID MUST be same as the one in the ilias-config.json.

4. Now launch the RPC server. I suggest using a systemd unit.

$ sudo vim /etc/system/systemd/ilias-rpc.service

and enter

[Unit]
Description=ILIAS RPC Server
After=network.target

[Service]
Environment=JAVA_OPTS="-Dfile.encoding=UTF-8"
Environment=ILSERVER_JAR="/var/www/html/ilias/Services/WebServices/RPC/lib/ilServer.jar"
Environment=ILSERVER_INI="/var/www/html/ilias/Services/WebServices/RPC/lib/ilServer.properties"

ExecStart=-/usr/bin/java $JAVA_OPTS -jar $ILSERVER_JAR $ILSERVER_INI start
ExecStop=/usr/bin/java $JAVA_OPTS -jar $ILSERVER_JAR $ILSERVER_INI stop

[Install]
WantedBy=multi-user.target

Then enable the service and start it

$ sudo systemctl enable ilias-rpc.service
$ sudo systemctl start ilias-rpc.service

5. Take a look if the Java RPC service runs, e.g.

ss -tulpn | grep java

Finalize

Now you have a running ILIAS7 instance. Setting up SSL encryption is a breeze with Let's Encrypt's certbot, if you used the right names in your vhost configuration.

Final Words

ILIAS 7 is not ready for prime-time. After way too many hours wasted experimenting and asking for help on the forums I have come to the conclusion that learning certificates are just not there yet in ILIAS 7. The previous version used PhantomJS to render the PDFs and while it was cumbersome, it worked. PhantomJS is deprecated and has been removed from ILIAS 7. A good choice in principle, however the sketchy documentation has thus become even more useless because it still describes how to set up PDF generation using PhantomJS. The new approach uses WKHTMLtoPDF and runs fine without Java. ILIAS 7 can and does produce PDFs for several functions, however the learning certificates do not work anymore. I don't know shit about ILIAS internal structure but I guess we see a weird interaction here with the removal of certificates from the personal workspace [4].

But frankly, I'm talking out of my ass. I'm just a guy who is maintaining a few machines with ILIAS installations. My strength is not ILIAS code and I don't know anything. What I lament is not only the time wasted by me and the many other people on the forums to figure out how to get PDF learning certificates back but the dismal state of the documentation and the lackadaisical reactions on the forums. I'd been happy with a comment like "does not work at the moment" to my questions. It would have saved me a lot of time.

[3] PhantomJS removed from ILIAS 7

[4] Remove Certificates from Personal Workspace in ILIAS 7