MoodleBox: Unterschied zwischen den Versionen

Aus MoodleDocs
Wechseln zu:Navigation, Suche
Keine Bearbeitungszusammenfassung
Zeile 15: Zeile 15:
=== Installation ===
=== Installation ===
Das MoodleBox-Plugin ist in der vorinstallierten MoodleBox bereits verfügbar. Hier muss nichts mehr installiert werden. Möchten Sie selber eine MoodleBox von Grund auf installieren, so wird das Plugin im Verzeichnis moodle/admin/tool/moodlebox installiert. Die neue Option MoodleBox ist unter ''Website-Administration > Server'' zu finden.
Das MoodleBox-Plugin ist in der vorinstallierten MoodleBox bereits verfügbar. Hier muss nichts mehr installiert werden. Möchten Sie selber eine MoodleBox von Grund auf installieren, so wird das Plugin im Verzeichnis moodle/admin/tool/moodlebox installiert. Die neue Option MoodleBox ist unter ''Website-Administration > Server'' zu finden.
To complete the installation, you have to configure some `direvent` jobs on the MoodleBox.
1. Install `direvent` package:
    ```bash
    sudo apt-get install direvent
    ```
1. Add following lines to file `/etc/direvent.conf`:
    ```bash
    # This is the configuration file for direvent. Read
    # direvent.conf(5) for more information about how to
    # fill this file.
    debug 0;
    watcher {
      path /var/www/moodle/admin/tool/moodlebox/;
      file .reboot-server;
      event CLOSE_WRITE;
      command "/sbin/shutdown -r now";
    }
    watcher {
      path /var/www/moodle/admin/tool/moodlebox/;
      file .shutdown-server;
      event CLOSE_WRITE;
      command "/sbin/shutdown -h now";
    }
    watcher {
      path /var/www/moodle/admin/tool/moodlebox/;
      file .set-server-datetime;
      event CLOSE_WRITE;
      command "/bin/bash /var/www/moodle/admin/tool/moodlebox/.set-server-datetime";
    }
    watcher {
      path /var/www/moodle/admin/tool/moodlebox/;
      file .newpassword;
      event CLOSE_WRITE;
      command "/bin/bash /var/www/moodle/admin/tool/moodlebox/bin/changepassword.sh";
    }
    watcher {
      path /var/www/moodle/admin/tool/moodlebox/;
      file .wifisettings;
      event CLOSE_WRITE;
      command "/usr/bin/python3 /var/www/moodle/admin/tool/moodlebox/bin/changewifisettings.py";
    }
    watcher {
      path /var/www/moodle/admin/tool/moodlebox/;
      file .resize-partition;
      event CLOSE_WRITE;
      command "/bin/bash /var/www/moodle/admin/tool/moodlebox/bin/resizepartition.sh";
    }
    ```
==== Copy the following line at the end of file /etc/sudoers ====
    www-data ALL=(ALL) NOPASSWD:/sbin/parted /dev/mmcblk0 unit MB print free
    www-data ALL=(ALL) NOPASSWD:/usr/bin/vcgencmd
==== If you use PiJuice, install the related packages ====
    sudo apt-get install pijuice-base
    sudo adduser www-data i2c
und Starten Sie die MoodleBox neu


=== Sicherheit mit https ===
=== Sicherheit mit https ===

Version vom 3. Dezember 2022, 16:21 Uhr

Die MoodleBox ist ein vorinstallierter mobiler Moodle-Server auf dem Raspberry Pi. Zur Nutzung wird ein Raspberry Pi 3A+, 3B, 3B+ oderr 4B empfohlen. Eine aktuelle Dokumentation zur MoodleBox finden Sie auf der MoodleBox-Website https://moodlebox.net/de/. Die MoodleBox gibt es für alle Versionen ab Moodle 3.6. (MoodleBox-Releases)


MoodleBox

Voraussetzungen

  • Raspberry Pi Modell 3A+, 3B, 3B+ or 4B (empfohlen)
  • microSD-Karte mit 8GB, 16GB, 32GB oder 64GB

Installation

Anwendungsbeispiele

MoodleBox-Plugin

Installation

Das MoodleBox-Plugin ist in der vorinstallierten MoodleBox bereits verfügbar. Hier muss nichts mehr installiert werden. Möchten Sie selber eine MoodleBox von Grund auf installieren, so wird das Plugin im Verzeichnis moodle/admin/tool/moodlebox installiert. Die neue Option MoodleBox ist unter Website-Administration > Server zu finden.

To complete the installation, you have to configure some `direvent` jobs on the MoodleBox.

1. Install `direvent` package:

   ```bash
   sudo apt-get install direvent
   ```

1. Add following lines to file `/etc/direvent.conf`:

   ```bash
   # This is the configuration file for direvent. Read
   # direvent.conf(5) for more information about how to
   # fill this file.
   debug 0;
   watcher {
     path /var/www/moodle/admin/tool/moodlebox/;
     file .reboot-server;
     event CLOSE_WRITE;
     command "/sbin/shutdown -r now";
   }
   watcher {
     path /var/www/moodle/admin/tool/moodlebox/;
     file .shutdown-server;
     event CLOSE_WRITE;
     command "/sbin/shutdown -h now";
   }
   watcher {
     path /var/www/moodle/admin/tool/moodlebox/;
     file .set-server-datetime;
     event CLOSE_WRITE;
     command "/bin/bash /var/www/moodle/admin/tool/moodlebox/.set-server-datetime";
   }
   watcher {
     path /var/www/moodle/admin/tool/moodlebox/;
     file .newpassword;
     event CLOSE_WRITE;
     command "/bin/bash /var/www/moodle/admin/tool/moodlebox/bin/changepassword.sh";
   }
   watcher {
     path /var/www/moodle/admin/tool/moodlebox/;
     file .wifisettings;
     event CLOSE_WRITE;
     command "/usr/bin/python3 /var/www/moodle/admin/tool/moodlebox/bin/changewifisettings.py";
   }
   watcher {
     path /var/www/moodle/admin/tool/moodlebox/;
     file .resize-partition;
     event CLOSE_WRITE;
     command "/bin/bash /var/www/moodle/admin/tool/moodlebox/bin/resizepartition.sh";
   }
   ```

Copy the following line at the end of file /etc/sudoers

   www-data ALL=(ALL) NOPASSWD:/sbin/parted /dev/mmcblk0 unit MB print free
   www-data ALL=(ALL) NOPASSWD:/usr/bin/vcgencmd

If you use PiJuice, install the related packages

   sudo apt-get install pijuice-base
   sudo adduser www-data i2c

und Starten Sie die MoodleBox neu

Sicherheit mit https

Für eine normale lokale Verwendung der MoodleBox ist das nicht notwendig, aber wenn sie mit dem Internet verbunden wird.

Features

  • Info zur MoodleBox (Versionen von Linux-Kernel, Raspberry Pi OS, freiem Speicher auf der microSD-Karte, CPU-Auslastung, CPU-Temperatur, CPU-Frequenz, Einschaltzeit, DHCP-Clients und mehr).
  • Warnung wenn eine Unterspannung entdeckt wurde.
  • GUI zum Setzen von Datum und Zeit.
  • GUI zum Setzen des MoodleBox-Kennworts.
  • GUI zum Setzen der MoodleBox WLAN-Einstellungen: SSID and deren Sichtbarkeit, Regulierungsland, Kanal, Kennwort (oder kein Kennwort) und die IP-Adresse des Servers.
  • GUI zum Vergrößern der Partition auf der microSD-Karte der MoodleBox, falls das nötig ist.
  • GUI zum Neustarten und Herunterfahren der MoodleBox.

Verfügbarkeit

Der Code zur Erstellung der MoodleBox und der Code für das Plugin finden Sie auf https://github.com/moodlebox/moodlebox und https://github.com/moodlebox/moodle-tool_moodlebox.

Weitere Infos