Vollständiges Installationspaket für Mac OS X: Unterschied zwischen den Versionen

Aus MoodleDocs
Wechseln zu:Navigation, Suche
Zeile 25: Zeile 25:
==Moodle4Mac herunterladen und installieren==
==Moodle4Mac herunterladen und installieren==


'''Schritt 1:''' Laden Sie die Installationsdatei '''Moodle4Mac-MAMP-xx.dmg''' von der Internetseite [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] herunter. Sie finden unterschiedliche Dateien für die verschiedenen Moodle-Versionen.  
'''Schritt 1:''' Laden Sie die Installationsdatei '''Moodle4Mac-MAMP-xx.dmg''' von der Internetseite [http://download.moodle.org/macosx/ Moodle packages for Mac OS X] herunter. Sie finden auf der Internetseite unterschiedliche Dateien für die verschiedenen Moodle-Versionen.  
   
   



Version vom 16. Juni 2012, 12:50 Uhr


Vorlage:Zum Übersetzen

Vorlage:Installing Moodle

Überblick

Die vollständigen Installationspakete für Mac OS X basieren auf der Software MAMP und stehen als Moodle packages for Mac OS X frei zum Download zur Verfügung. 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. Ä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 sondern ausschließlich als lokale Umgebung zum Testen und Entwickeln. Die Pakete enthalten alles, was zum Betrieb von Moodle notwendig ist, inklusive einem Webserver, einer Datenbank und einer Skriptsprache (in diesem Fall Apache, MySQL and PHP). Für die unterschiedlichen Moodle-Versionen sind jeweils eigene Installationspakete verfügbar.


Hinweis 1: Die aktuellste Version des Installationspakets Moodle4Mac könnte eventuell nicht kompatibel zu dem Moodle sein, das Ihre Institution (Schule, Hochschule, Universität, Firma) im Internet 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, Konfigurationen oder Sicherheitsmaßnahmen 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)

Moodle4Mac 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 Moodle-Versionen.


Schritt 2: Öffnen Sie die Installationsdatei Moodle4Mac-MAMP-xx.dmg mit einem Doppelklick.

Moodle4Mac 1.png


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.

Moodle4Mac 2.png


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.

Moodle4Mac 4.png


Schritt 6: Start your browser and type http://127.0.0.1:8888 or http://localhost:8888 in the address bar. You will start your preinstalled Moodle. You do not need to do any installation. You are ready. Done ... hey, that was easy, wasn't it??

Datei:Moodle4Mac 3.jpg


Schritt 7: Please login with the username admin and the password 12345 and you will be the main administrator of your new local Moodle.

Moodle4Mac als Server im lokalen Netzwerk

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);

$CFG->dbtype    = 'mysql';
$CFG->dbhost    = 'localhost';
$CFG->dbname    = 'moodle20';
$CFG->dbuser    = 'moodle';
$CFG->dbpass    = 'moodle';
$CFG->dbpersist =  false;
$CFG->prefix    = 'mdl_';
$CFG->dboptions = array ('dbpersit' => 0, );

// Use the ip address of your computer instead of localhost
$CFG->wwwroot   = 'http://192.168.0.20:8888/moodle20';
$CFG->dirroot   = '/Applications/MAMP/htdocs/moodle20';
$CFG->dataroot  = '/Applications/MAMP/data/moodle20';
$CFG->admin     = 'admin';

$CFG->passwordsaltmain = 'some_very_long_secret!#A12345678901234567890!';
$CFG->directorypermissions = 00777;  // try 02777 on a server in Safe Mode

require_once("$CFG->dirroot/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.

Moodle4Mac Firewall1.png

When the rule exists it must be activated to get a connection to Moodle from any computer in your internal network.

Moodle4Mac Firewall2.png

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!!

Datei:Moodle4Mac Network1.png

Datei:Moodle4Mac Network2.png

Ein paar Worte zur Sicherheit ...

MAMP als 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 ...


 

SSL/HTTPS für Moodle4Mac

The text is copied from webopius web site (excepted the last steps).

  1. stop MAMP
  2. backup your /Applications/MAMP/conf folder
  3. open a terminal
  4. enter: openssl genrsa -des3 -out server.key 1024. Enter a password twice.
  5. 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)
  6. enter: openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
  7. enter: cp server.key server.tmp
  8. enter: openssl rsa -in server.tmp -out server.key. Enter the previous password.
  9. enter: mkdir /Applications/MAMP/conf/ssl
  10. enter: cp server.crt /Applications/MAMP/conf/ssl
  11. enter: cp server.key /Applications/MAMP/conf/ssl
  12. Edit Applications/MAMP/conf/apache/ssl.conf:
    1. comment <IfDefine SSL> tag to closing tag (but not the content)
    2. SSLCertificateFile /Applications/MAMP/conf/ssl/server.crt
    3. SSLCertificateKeyFile /Applications/MAMP/conf/ssl/server.key
  13. Edit /Applications/MAMP/conf/apache/httpd.conf:
    1. Listen 80
    2. comment <IfDefine SSL> tag to closing tag (but not the content)
  14. Edit /Application/MAMP/conf/apache/ssl.conf, change the document root (DocumentRoot) for the one you have into /Application/MAMP/conf/apache/httpd.conf
  15. in a terminal enter: cd /Applications/MAMP/bin/apache2/bin
  16. enter: sudo ./apachectl startssl
  17. 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 für Moodle4Mac?

It is very simple to update your locally installed Moodle. If you have got this course together with Moodle4Mac then you should have everything you need for a CVS update.

The only software you must have installed on your Apple computer is the Xcode Tools package from your system installation media. After this it only needs a doubleclick to get the newest Moodle version without downloading the complete installation package.

Update des lokalen Moodle via CVS

Be sure that the Xcode Tools are installed on your Mac computer. You also must have an internet connection to get the files from the update server.

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.

Moodle4Mac Update1.png

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.

Moodle4Mac Update2.png

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 ...

If you want to see what is inside the document UpdateMoodle.sh please feel free to open it with a text editor. It is only a text file but it uses the Mac OS X feature to open a file with a chosen program via doubleclick.

Datei:Moodle4Mac Update3.png

I chose the system utility Terminal to open the file UpdateMoodle.sh and to run the script it contains automatically. So everything can be done with a doubleclick. It's easy and everybody can do it!!

#! /bin/sh
#
#  This CVS updater for Mac OS X is part 
#  of the installation package Moodle4Mac
# 
#  20111208 - Ralf Krause
#

export CVS_RSH=ssh

echo
echo "+--------------------------------------------+"
echo "| CVS update for your local Moodle server     "
echo "+--------------------------------------------+"
echo

### file ~/.cvspass must exist
if ! test -e ~/.cvspass ; then
    touch ~/.cvspass
fi

cd /Applications/MAMP/htdocs/moodle22/

### login to the cvs server only for the first time
if ! grep "uk.cvs.moodle.org" ~/.cvspass > /dev/null ; then
    echo "CVS password is empty ... please only press <return> to start"
    cvs -d :pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle login
    echo
fi

echo "Connecting to the CVS server. Download will take a few moments!"
echo "If the CVS update runs too long you may break with <strg>-C"
echo
cvs -q update -dP -r MOODLE_22_STABLE

The different versions of the update script are different in only two things ... first you need to choose the correct folder for the Moodle files and seconds you must input the correct CVS tag for the Moodle version in the last line. The shown script is for updating the version Moodle 2.2.

  • Moodle 1.6 uses MOODLE_16_STABLE
  • Moodle 1.7 uses MOODLE_17_STABLE
  • Moodle 1.8 uses MOODLE_18_STABLE
  • Moodle 1.9 uses MOODLE_19_STABLE
  • 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 HEAD

Xcode Tools auf dem Mac installieren

Xcode Tools is the developer tools package for Mac OS X. This package includes an integrated suite of software development tools, including compilers and applications.

If you do not know whether the Xcode Tools are installed on your Mac please look on your main harddrive. If there is a folder named Developer then you must do nothing.

Datei:Moodle4Mac Update4.png

If you cannot find this on your harddrive then you must install this package before following the instructions in this document. The Xcode Tools package is part of the Mac OS X installation media. You will find the Xcode Tools on your installation CD or DVD set.

Datei:Moodle4Mac Update5.png

If you do not find your installation media anymore you also can download the Xcode Tools from the URL http://developer.apple.com/tools/xcode/. It is free but you have to register as a developer. If you start the download from there please remember that the Xcode package brings a lot of bytes and will need a very few minutes to complete.

After you have put these things into your system you will see a new folder named Developer on your harddisk. If you only want to update your Moodle you do not need all these nice developer tools from the inside of the folder. Sorry about this but there is no separate installer for the CVS update process.
 

Weitere Informationen

Siehe auch