Vollständiges Installationspaket für Mac OS X
Überblick
Die Installationspakete für Mac OS X heißen Moodle4Mac und erlauben eine extrem einfache Installation von Moodle auf einem Mac-Arbeitsplatzcomputer oder Mac-Server. Moodle4Mac basiert auf der Software MAMP und steht über die Seite Moodle packages for Mac OS X frei zum Download zur Verfügung. Ähnliche Pakete gibt es auch für die Betriebssysteme Windows und Linux, die allerdings ein bisschen anders konfiguriert sind.
Die lokale Moodle-Installation auf Basis von MAMP ist nicht als öffentlicher oder produktiver Server gedacht. MAMP ist ausschließlich als lokale Umgebung zum Testen und Entwickeln vorgesehen. MAMP enthält alles, was zum Betrieb von Moodle notwendig ist, den Webserver Apache, die Datenbank MySQL und die Skriptsprache PHP. Für die unterschiedlichen Versionen von Moodle sind jeweils eigene Installationspakete verfügbar.
Hinweis 1: Die aktuellste Version von Moodle4Mac könnte eventuell nicht kompatibel zu dem Moodle sein, das Ihre Institution (Schule, Hochschule, Universität, Firma) auf dem Internetserver betreibt. Bitte prüfen Sie deswegen jeweils vor der Installation, ob Sie Ihre Materialien zwischen den beiden Plattformen problemlos austauschen können.
Hinweis 2: Falls Sie Moodle sicher mit Mac OS X betreiben möchten, lesen Sie die Anleitung Schritt-für-Schritt-Installation auf einem Mac OS X Server. Moodle4Mac ist ausschließlich für eine schnelle Moodle-Installation auf dem lokalen Computer gedacht, ohne sich Gedanken um weitere Programme, Konfiguration oder Sicherheit machen zu müssen.
Systemvoraussetzungen
+ Apple Mac Computer + iMac, Mac mini, MacBook, Mac Pro, Xserve + Prozessor: Intel i5, i7, Core 2 Duo, Xeon + RAM: 2 GB oder mehr + Festplatte: 800 MB freier Platz + Systemsoftware: Mac OS X 10.6 oder 10.7 (Die Pakete mit XAMPP arbeiten außerdem mit 10.4 and 10.5)
Paket herunterladen und installieren
Schritt 1: Laden Sie die Installationsdatei Moodle4Mac-MAMP-xx.dmg von der Internetseite Moodle packages for Mac OS X herunter. Sie finden auf der Internetseite unterschiedliche Dateien für die verschiedenen Versionen von Moodle.
Schritt 2: Öffnen Sie die Installationsdatei Moodle4Mac-MAMP-xx.dmg mit einem Doppelklick.
Schritt 3: Bewegen Sie das Verzeichnis MAMP in das Verzeichnis Programme. Moodle4Mac basiert auf MAMP (Mac OS X, Apache, MySQL, PHP) und speichert alle Einstellungen innerhalb dieses Verzeichnisses. Falls Sie Moodle4Mac irgendwann wieder löschen möchten, schieben Sie das Verzeichnis MAMP in den Papierkorb. Weitere Informationen zu MAMP finden Sie auf der Projektseite [1]
Schritt 4: Jetzt sind Sie bereits fertig, um den Moodle-Server zu starten. Öffnen Sie das Verzeichnis Programme. Öffnen Sie das Verzeichnis MAMP.
Schritt 5: Starten Sie das Programm MAMP mit einem Doppelklick auf das Symbol. Für einen späteren Programmstart können Sie das Symbol auch in das Dock von Mac OS X bewegen.
Schritt 6: Ihr Standardbrowser wird automatisch mit der Adresse http://localhost:8888/MAMP geöffnet und zeigt Ihnen Informationen zu MAMP. Über die blaue Taste Moodle gelangen Sie auf die Startseite von Moodle http://localhost:8888/moodle. Alles ist fertig! Sie benötigen keine weiteren Installationsschritte. Das ist doch wirklich einfach oder etwa nicht??
Schritt 7: Bitte melden Sie sich mit dem Anmeldenamen admin und den Kennwort 12345 an. Damit sind Sie Administrator in Ihrem neuen eigenen Moodle.
Sprache auf deutsch umschalten
Server im lokalen Netzwerk bereitstellen
In verschiedenen Workshops haben wir Moodle4Mac als schnelle Serverinstallation im lokalen Netzwerk erprobt. Achten Sie unbedingt darauf, dass Sie die Administrationskennworte für Moodle und MySQL ändern, bevor Sie den Zugriff auf diesen Server freigeben. In diesem Abschnitt werden alle notwendigen weiteren Einstellungen gezeigt, um den Server im lokalen Netzwerk zu benutzen. Insgesamt sind nur drei Schritte notwendig. Der erste Schritt ist die Änderung einer Zeile in der config.php von Moodle. Im zweiten Schritt müssen Sie die Firewall Ihres Computers für Moodle öffnen und im dritten Schritt müssen Sie die Basisadresse in Moodle anpassen.
Datei config.php ändern
Use the current ip address of your computer instead of localhost so an external computer can connect the the web server. If your network is configured to dynamic ip addresses via DHCP please make sure that your computer retains its ip address while you want to use it as a Moodle server.The best thing would be to get a static ip address for your computer. Mostly your ip address in a local network will show one of the following numbers 10.x.x.x, 172.x.x.x, or 192.168.x.x
If your computer for example has the ip address 192.168.0.20 then you must change the configuration from localhost to 192.168.0.20. In the following box you will see this address in the line $CFG->wwwroot. This ip address will be different in your own network. You must use own address for your own network!! Please do not use an ip address if you do not know what you are doing ... ask your network administrator.
<?php /// Moodle configuration file unset($CFG); global $CFG; $CFG = new stdClass(); $CFG->dbtype = 'mysqli'; $CFG->dblibrary = 'native'; $CFG->dbhost = 'localhost'; $CFG->dbname = 'moodle22'; $CFG->dbuser = 'moodle'; $CFG->dbpass = 'moodle'; $CFG->prefix = 'mdl_'; $CFG->dboptions = array ( 'dbpersit' => 0, 'dbsocket' => 1, ); // Use the ip address of your computer instead of localhost $CFG->wwwroot = 'http://192.168.0.20:8888/moodle22'; $CFG->dirroot = '/Applications/MAMP/htdocs/moodle22'; $CFG->dataroot = '/Applications/MAMP/data/moodle22'; $CFG->admin = 'admin'; $CFG->passwordsaltmain = '(y{QW:<89C.pa%S`BZ)g!0]w(Ygb}`,'; $CFG->directorypermissions = 00777; // try 02777 on a server in Safe Mode require_once(dirname(__FILE__) . '/lib/setup.php'); // There is no php closing tag in this file, // it is intentional because it prevents trailing whitespace problems!
Firewall öffnen
The web server that comes together with Moodle4Mac works on the TCP port 8888. Moodle4Mac uses this port because this gets no conflicts with the normal web server of Mac OS X that answers on TCP port 80. You can switch the port from 8888 to 80 but you must know the administration password of your Mac. In this case the normal web server will not work.
To open the firewall please go to System Preferences > Sharing > Firewall. Choose New..., fill in TCP port 8888, and set the rule name Moodle4Mac.
When the rule exists it must be activated to get a connection to Moodle from any computer in your internal network.
Basisadresse in Moodle anpassen
Moodle im lokalen Netzwerk aufrufen ...
Your web server can be connected with the url http://x.x.x.x:8888/moodle18/ in your local network, where x.x.x.x is the address your Mac was given by the local router on your LAN. Usually such numbers start with 10.x.x.x, 172.x.x.x, or 192.168.x.x. All users from any computer in your network can use your Moodle via this address.
This also works if your computer is connected to the internet directly. If you open the firewall in your internet router and if you forward the port 8888 to your computer then any user everywhere on the world would be able to work with your Moodle ... but please remember also that there are a lot of security risks if you do this ... it would be better if you don't do this!!
Ein paar Worte zur Sicherheit ...
MAMP ist als lokaler Server entwickelt
MAMP can be used for testing and developing websites locally on their Apple computers. MAMP should not be used in a production environment because everybody knows all the settings and all the predefined passwords. It's prepared for an easy start and not for a public web server!! But with some careful modfications, you can sufficiently secure MAMP and Moodle4Mac to use them in public development environments.
Wie kann man MAMP sicherer machen?
I found some ideas in the following document: How to secure MAMP?. It's really old and some of the instructions are not correct for the current version.
There is also a new package MAMP Pro that will let you do a lot of settings for a more secure web server. Please look to the web page for this product. You can find a describtion for MAMP Pro on the MAMP internet server. It's commertial and not free!
Schritt-für-Schritt-Anleitung für Moodle4Mac
fehlt noch ...
Sichere Verbindungen mit SSL/HTTPS
The text is copied from webopius web site (excepted the last steps).
- stop MAMP
- backup your /Applications/MAMP/conf folder
- open a terminal
- enter: openssl genrsa -des3 -out server.key 1024. Enter a password twice.
- enter: openssl req -new -key server.key -out server.csr. Enter the previous password. You need to answer some questions. Common name expects your local name (for me it was jerome.moodle.local)
- enter: openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
- enter: cp server.key server.tmp
- enter: openssl rsa -in server.tmp -out server.key. Enter the previous password.
- enter: mkdir /Applications/MAMP/conf/ssl
- enter: cp server.crt /Applications/MAMP/conf/ssl
- enter: cp server.key /Applications/MAMP/conf/ssl
- Edit Applications/MAMP/conf/apache/ssl.conf:
- comment <IfDefine SSL> tag to closing tag (but not the content)
- SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt
- SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key
- Edit /Applications/MAMP/conf/apache/httpd.conf:
- Listen 80
- comment <IfDefine SSL> tag to closing tag (but not the content)
- Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf
- in a terminal enter: cd /Applications/MAMP/bin/apache2/bin
- enter: sudo ./apachectl startssl
- start MAMP
From now MAMP should start/stop with the SSL support activated. Note that these steps have only be tested with Apache port set to 80 into MAMP preferences.
Wie funktioniert ein Update?
Es ist sehr einfach, Ihr lokal installiertes Moodle4Mac auf dem aktuellen Stand zu halten. Zusätzlich müssen Sie lediglich die Software Git installieren, falls diese noch nicht auf Ihrem Mac verfügbar ist. Alles andere ist vorhanden.
Update des lokalen Moodle via Git
Stellen Sie sicher, dass das Programm Git auf Ihrem Mac installiert ist (siehe Anleitung). Außerdem benötigen Sie eine Internetverbindung, um die Dateien vom Updateserver herunterladen zu können.
Es reicht ein Doppelklick auf das Symbol UpdateMoodle.sh im Verzeichnis MAMP und die Aktualisierung läuft automatisch ab. Das ist wirklich alles ... einfacher geht es nicht!!
Now the only thing you need to do is to doubleclick on an icon inside your MAMP folder. That's all .... really .... it's easy!!
Please look for the document UpdateMoodle.sh. If you doubleclick this file you will see that the system utility Terminal opens and the update process starts automatically. You must allow to connect to the Moodle internet server ... but think about this fact only if a system tool asks you.
The update tool CVS connects to the Moodle internet server and looks for all those files that must be downloaded. If the process asks for a password you press the return button to enter ... the password is "empty". The update needs a few moments to find all the updated or new files but then only those files are transfered. Please wait for some minutes.
Every updated file is shown in the update log so you can control if the updater works and when it is completed. At least you will see the config.php because this file does not come from the update server.
If the update takes too long you may break with <strg>-C. It doesn't matter because only text files are copied. On break the process stops working. If you restart the update again the CVS tool runs through all folders and files again to find those that need to be renewed.
Ein Blick unter die Haube ...
Um sehen zu können, was innerhalb des Skripts UpdateMoodle.sh abläuft, öffnen Sie die Datei mit einem Texteditor, z.B. TextWrangler.
Es ist eine Textdatei, für die eine Einstellung so verändert wurde, dass die Textdatei per Doppelklick im Systemwerkzeug Terminal geöffnet und automatisch ausgeführt wird. Sie brauchen sich keine Systembefehle zu merken, es reicht ein Doppelklick zum Aktualisieren.
#! /bin/sh # # This GIT installer for Mac OS X is part # of the installation package Moodle4Mac # # 20120616 - Ralf Krause # echo echo "+--------------------------------------------+" echo "| GIT updater for your local Moodle server" echo "+--------------------------------------------+" echo cd /Applications/MAMP/htdocs if ! test -e moodle22/.git ; then ## the first git update must get everything including .git git clone --depth 1 -b MOODLE_22_STABLE git://github.com/moodle/moodle.git moodle22-git cp moodle22/config.php moodle22-git DATE=`date +%Y%m%d-%H%M` mv moodle22 moodle22-$DATE mv moodle22-git moodle22 ## the old folder can be deleted now ## rm -R moodle22-* else ## the next git update only gets the new files cd moodle22 git pull cd .. fi
Die verschiedenen Versionen des Skripts UpdateMoodle.sh unterscheiden sich nur in zwei Parametern ... erstens müssen Sie den richtigen Ordner für die Moodledateien eintragen und zweitens Müssen Sie den richtigen Git-Tag für die Moodleversion angeben. Das gezeigte Skript aktualisiert Moodle 2.2.
- Moodle 2.0 uses MOODLE_20_STABLE
- Moodle 2.1 uses MOODLE_21_STABLE
- Moodle 2.2 uses MOODLE_22_STABLE
- Moodle 2.3dev uses master
Git auf dem Mac installieren
Weitere Informationen
- MAMP = Mac + Apache + MySQL + PHP
- MAMP in Wikipedia
- Step by Step Installation on a Mac OS X Server
- Step by step Installation on a Mac OS X Client 10.4
- Git für Administratoren
- Vollständiges Installationspaket für Mac OS X für Moodle 1.9