ILIAS-7-Install-Tutorial for Ubuntu 20.04
Etherpad-Lite
Add a user for the service
useradd --home /opt/etherpadlite --shell /bin/nologin etherpadinstall -d -m 755 -o etherpad -g etherpad /opt/etherpadlitechmod 775 /optchown -R etherpad:etherpad /opt/etherpadlite
Download
cd /optgit clone https://github.com/ether/etherpad-lite.git etherpadlitecd etherpadlite
Create Database
mysql- Create Database "etherpad": mysql>
CREATE DATABASE etherpad CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - Create Databaseuser "epuser1": mysql>Â
CREATE USER 'epuser1'@'localhost' IDENTIFIED BY 'USER_PASSWORD'; - Give user "epuser1" rights to database "etherpad": mysql>Â
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, INDEX, DROP, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON etherpad.* TO 'epuser1'@'localhost';
Configure the Server
cp settings.json.template settings.jsonnano settings.json- Have a look at this section:
1 | /* |
- Remove the comments
/*and*/ - Fill in the database credentials from above
- Comment out the dirty db credentials above:
1 | /* |
- Line 216:Â
"requireSession": true, - Line 238:Â
"minify": false, - Line 255: Give abiword path (whereis abiword):Â
"abiword": "/usr/bin/abiword", - Line 367: Remove
/*and*/and change passwords for admin and user (changeme1):
1 | "users": { |
- Line 442:
"loglevel": "WARN", - Exit nano
export NODE_ENV=production
Start the pad
- Adjust right settings:
chmod -R 770 /opt/etherpadlitechown -R etherpad:etherpad /opt/etherpadlite
- Â Run it for testing: Â
bin/run.sh --root - Open a browser:
http://yourdomain.de:9001/ - Peform the test again with user www-date - this must work!:Â
sudo -H -u etherpad /opt/etherpadlite/bin/run.sh - Because you allready added the subdomain in your DNS and vhost settings, you can also try:
https://pad.yourdomain.de - If you try to open an new pad is this a good message: "You do not have permission to access this pad". We will later authorize via ILIAS.
- Stop testing with
STRG+C
Deploy a Startscript for Etherpad-Lite
cd /etc/init.dnano etherpadlite- Paste in the following in:
1 | #!/bin/bash |
chmod +x etherpadlite- Call the script:
/etc/init.d/etherpadlite start - Start your browser again and call the pad:
yourdomain.de:9001andhttps://yourdomain.de
Harden the service
- We add another script that checks if the service realy runs:
mkdir /opt/scriptsnano /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- Paste this:
1 | #Check Etherpad every 2 minutes if it runs. If not, it will be restarted |
Install Etherpad-Plugins
- To call the admin page type in your browser:
pad.yourdmain.de:/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:
- headings
- author_hover
Configuring ILIAS
mkdir -p /var/www/html/ilias/Customizing/global/plugins/Services/Repository/RepositoryObjectcd /var/www/html/ilias/Customizing/global/plugins/Services/Repository/RepositoryObjectgit clone https://github.com/jrocho/ILIAS-Etherpad-Lite-Plugin.git EtherpadLite- Adjust right settings:
chmod -R 775 EtherpadLitechown -R www-data:www-data EtherpadLite
- Login to ILIAS and call Administration-Plugins
- Update the Plugin (Aktualisieren)
- Configure the plugin (regard only the right https-column):
Setting | http | http port 80 | https |
Host | bbs-ilias | pad.bbs-ilias.de | pad.bbs-ilias.de |
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 |
- In ILIAS try in the repository the new object EterpadLite :)
Troubleshooting
You can find errors in /var/log/etherpadlite.log
#1 Problem: npm ERR! Your cache folder contains root-owned files
1 | npm ERR! |
Solution
- Run the service with a user which has its home-directroy in /opt/etherpadlite (as described above)
#2 Plugins install problems or start problems generally
npm config set registry http://registry.npmjs.org/ --globalnpm cache clear --forcenpm install --verbose