ILIAS-Tricks not only for Schools
Install EtherpadLite@ILIAS
[wolfganghuebsch], [iliasadmin1] - 1. Jan 2018, 20:20
In this tutorial I install Etherpad-Lite on a Debian 9 and ILIAS 5.2 including a redirect to port 443/https. The tutorial should also fit to a current Ubuntu system.
Changelog
- 2019.09.18: Added a missing start script
Install needed office-suits and other stuff
apt-get install gzip git curl python libssl-dev pkg-config build-essential
apt-get install abiword
- Determine paths:
whereis abiword
gives/usr/bin/abiword
- Keep the paths in mind
Install Database
mysql -u root -p
- Give password for mysqluser root
- mysql>
CREATE DATABASE etherpad_1 CHARACTER SET utf8 COLLATE utf8_general_ci;
- No we give a user all rights to the database etherpad_1. You can use the user of the current ilias-Database. You find the credentials in the ilias-webdir ilias/data/clientname/client.ini.php
- mysql>
GRANT ALL PRIVILEGES ON etherpad_1.* TO 'db_iliasuser1'@'localhost';
- mysql>
exit
Install an run EtherpadLite
cd /opt
git clone https://github.com/ether/etherpad-lite.git
- Adjust right settings:
chmod -R 770 /opt/etherpad-lite
chown -R www-data:www-data /opt/etherpad-lite
cd etherpad-lite
- Run it for the first time:
bin/run.sh
- Stop it with
CTRL+C
nano settings.json
- Comment out the lines concerning the dirty db settings between 38 and 46 and remove the comments from the mysql-part between line 47-56. Give the mysql-crendetials from above. Example:
1 | /* |
- Goto line 72 to set language:
"lang": "en-gb"
- language-settings can be found here Example for german:"lang": "de"
- Goto line 108 and set
"requireSession" : true,
- Goto line 118 and set
"minify" : false,
- Give paths:
- Line 126:
"soffice" : "/usr/bin/abiword",
- Line 126:
- Comment out lines 158-169 an give credendials for user
- Adjust loglevel in 202:
"loglevel": "WARN",
- Comment out the logfile-part and give a filename in 214
- Exit and start the service:
bin/run.sh
- Start your browser and call the pad:
yourdmain.tld:9001
- If you try to add a new pad, this message is expected:
You do not have permission to access this pad
- Stop the process with
STRG+C
- In your etherpad-lite-directory should now be a file called APIKEY.txt. If not, run
bin/installDeps.sh
Because examples are allways good, here you can see my settings.json file I use @bbs-ilias:
1 | /* |
Deploy Etherpad with a start-stop-script
cd /etc/init.d
nano etherpad-lite
- Copy the following in:
1 | #!/bin/bash |
chmod +x etherpad-lite
- Call the script:
/etc/init.d/etherpad-lite start
- Start your browser again and call the pad:
yourdomain.tld:9001
- We add another script that checks if the service realy runs:
nano /opt/scripts/checkpad
- We add the following code and change line 3:
1 | #!/bin/bash |
chmod +x /opt/scripts/checkpad
Crontab settings
nano /etc/crontab
1 | #Check Etherpad every 2 minutes if it runs. If not, it will be restarted |
Install Plugins
- To call the admin page type in your browser:
yourdmain.tld:9001/admin
- Login with the admin-credentials you set in the file settings.json
- Choose "Plugin-Manager"
- I recomend to install only two or three plugins because plugins are always dangerous and their use can lead to crashes. I recommend only:
- headings2
- author_hover
Configuring ILIAS
mkdir -p /var/www/html/ilias/Customizing/global/plugins/Services/Repository/RepositoryObject
cd /var/www/html/ilias/Customizing/global/plugins/Services/Repository/RepositoryObject
git clone https://github.com/jrocho/ILIAS-Etherpad-Lite-Plugin.git EtherpadLite
- Adjust right settings:
chmod -R 775 EtherpadLite
chown -R www-data:www-data EtherpadLite
- Login to ILIAS and call Administration-Plugins
- Update the Plugin (Aktualisieren)
- Configure the plugin:
Setting | http | http port 80 | https |
Host | bbs-ilias | pad.bbs-ilias.de | pad.bbs-ilias |
Port | 9001 | 80 | 443 |
Apikey | Content of APIKEY.txt | Content of APIKEY.txt | Content of APIKEY.txt |
Domain | .bbs-ilias.de | .bbs-ilias.de | .bbs-ilias.de |
https | unchecked | checked | checked |
EP-Version | >=1.4 | >=1.4 | >=1.4 |
Usergroup | leave empty | leave empty | leave empty |
- The standardport of etherpad-lite is 9001. If you want to run your installation completely under port 80 or 443 (https), you have to install a rewrite that I explain in the next chapter.
Configure a port-rewrite from 9001 to 80
- If you want to run your whole ILIAS-installation under https, you have to configure a port-rewrite from port 9001 to 80 and later on to 443 (the rewrite to 443 will be done automatically by script). If you want that, you have to add another vhost-file:
cd /etc/apache2/sites-available
nano pad.bbs-ilias.de
- Copy the following in:
1 | <VirtualHost pad.bbs-ilias.de:80> |
- Edit the lines 1 and 20
- Restart the webserver:
/etc/init.d/apache2 restart
- Call in the browser
http://pad.yourdomain.tld
- We expect:
Enable port 443/https
- I assume that you allready installed certbot. If so, do the following:
certbot --apache
- Choose your new vhost
pad.yourdomain.tld
- Follow the menu
- Have a test in your browser:
https://pad.yourdomain.tld
- Update the new configuration (see table upwards) in
ILIAS->Adminsitration->Plugins
- You can find more information for https and ILIAS here