Linux learn map
This project should allow students of a Linux curse to get a quick overview of all exercises as well as automatic feedback for completed exercises.
The exercises are described in simple text files, one per execise. To test if an exercise is complete a "check" script is uploaded to a server via SSH and then executed. If the return value is 0 the exercise is complete.
The setup is outlined for a Debian based system:
Install Apache 2 webserver with PHP and SSH2 PHP module:
apt-get install apache2 libapache2-mod-php5 libssh2-php
You can use the
apache2-mpm-preforkpackage if you don't have a high load and want to save some memory.
For local development it can be helpful to set
/etc/php5/apache2/php.ini. Please don't do this on a live system.
Checkout the repository:
git clone https://github.com/arkanis/linux-learn-map.git cd linux-learn-map
publicdirectory accessable via the webserver. Either by setting a
DocumentRootto the public directory or by defining an alias.
The webserver also needs read-only access to most directories in the repository. Easiest way:
chgrp -R www-data .
sample.htaccessfile in the public directory to
.htaccessand configure the access control. For local development a local htpasswd file is useful. For productive deployment you might want to use LDAP authentication.
Create a private/public key pair in the
keysdirectory and configure the paths in
config.php. Don't set a password for the private key! The webserver will use the private key to open an SSH connection to the student VM every time a student checks the exercise.
Add the public key to the
authorized_keysfile of your student virtual machines.
Thats it for now.
Writing new exercises
By default all exercises are stored in the
exercises directory. Each subdirectory that contains a file
check is interpreted as an exercise. No matter how deeply nested the directories are.
A file named
exercise.txt in the same directorie contains additional information about the exercise. In
the simplest form this file looks like this:
Title: Install an Apache Webserver Description written in Markdown ...