Hinweis: Sie sind auf den Seiten der Moodle 1.9 Dokumentation. Die Dokumentation der aktuellsten Moodle-Version finden Sie hier: Installation von Moodle.

Installation von Moodle: Unterschied zwischen den Versionen

Aus MoodleDocs
Wechseln zu:Navigation, Suche
Zeile 73: Zeile 73:
Um das Installations-Skript auszuführen (install.php), versuchen Sie einfach Ihre URL des Moodle-Systems im Browser (z.B. Internet Explorer) aufzurufen. Benutzen Sie dabei folgenden Aufbau: '''<nowiki>http://yourserver/install.php</nowiki>'''.
Um das Installations-Skript auszuführen (install.php), versuchen Sie einfach Ihre URL des Moodle-Systems im Browser (z.B. Internet Explorer) aufzurufen. Benutzen Sie dabei folgenden Aufbau: '''<nowiki>http://yourserver/install.php</nowiki>'''.


(The Installer will try to set a session cookie. If you get a popup warning in your browser make sure you accept that cookie!)
(Das Installationsskript setzt ein Session-Cookie. Wenn Sie eine Popup-Warnung bekommen akzeptieren Sie das Cookie!)


Moodle will detect that configuration is necessary and will lead you through some screens to help you create a new configuration file called '''config.php'''. At the end of the process Moodle will try and write the file into the right location, otherwise you can press a button to download it from the installer and then upload '''config.php''' into the main Moodle directory on the server.
Moodle erkennt beim ersten Aufruf der Seite, das eine Installation/Konfiguration notwendig ist und wird über Verschiedene fenster Sie durch die Installation führen und damit die Datei '''config.php''' erzeugen. Am Ende dieser Installation wird Moodle versuchen diese Datei an der richtigen Stelle auf dem Webserver abzulegen, bzw. Sie können die Datei auch über einen Button herunterladen und anschließend über ein FTP-Programm an die richtige Stelle hochladen.


Along the way the installer will test your server environment and give you suggestions about how to fix any problems. For most common issues these suggestions should be sufficient, but if you get stuck, look below for more information about some of common things that might be holding you up.  
Während der Installation testet das Installationsskript die Servereinstellungen und gibt Lösungsvorschläge falls Probleme auftreten. Für die meisten Probleme sollten diese Vorschläge ausreichen. Sollten Sie keine Lösung umsetzen können, lassen Sie sich nicht so schnell entmutigen, schauen Sie auf dieser Seite nach weiteren Informationen die Ihnen hilfreich sein könnten.  


=== Check web server settings ===
=== Kontrolle der Webserver-Einstellungen ===


Firstly, make sure that your web server is set up to use index.php as a default page (perhaps in addition to index.html, default.htm and so on). In Apache, this is done using a DirectoryIndex parameter in your httpd.conf file. Mine usually looks like this:
Firstly, make sure that your web server is set up to use index.php as a default page (perhaps in addition to index.html, default.htm and so on). In Apache, this is done using a DirectoryIndex parameter in your httpd.conf file. Mine usually looks like this:

Version vom 8. Mai 2006, 11:33 Uhr

Zu allererst - KEINE PANIK! :-)

Diese Anleitung beschreibt die erste Installation von Moodle. Einige dieser Installationsschritte gehen sehr ins Detail und versuchen die meisten üblichen Webserver Einstellungen zu behandeln, und so sieht die Seite sehr kompliziert und sehr lang aus. Nocheinmal - KEINE PANIK - einmal verstanden instalieren Sie Moodle in wenigen Minuten.

Wenn Sie ein Installationsproblem haben, lesen Sie diese Seite aufmerksam durch - die meisten Probleme sind in diesem Text vorhanden. Wenn Sie weiterhin keine Lösung finden, können Sie in der Moodle Community nach Hilfe suchen moodle.org Using Moodle.

Eine andere Lösung die zu einem Moodle-System führt, ist über einen kommerziellen Zertifizierten Moodle-Anbieter, der Ihnen Moodle komplett Betreut (Updates/zusätzliche Module...) um sich direkt um Inhalt zu kümmern....

Voraussetzungen

Moodle ist auf dem Betriebssystem Linux mit einem Apache-Webserver, MySQL-Datenbank und PHP-Unterstützung (manchmal als Kompletsystem LAMP bezeichnet), aber es werden auch andere Datenbanken (PostgreSQL) oder Betriebssysteme (Windows/Mac OS oder Netware) unterstützt.

Grundlegende Voraussetzung für ein Moodle-System sind folgende:

  • Web-Server Software. Oft wird Apache benutzt, aber Moodle sollte mit jeder Web-Server-Software funktionieren die PHP unterstützung anbietet (z.B. Microsofts IIS).
  • PHP Skript-Sprachen Unterstützung (Version 4.1.0 oder eine höhere Version). PHP Version 5 wird ab der Version Moodle 1.4 unterstützt (Bitte beachten Sie das es Besonderheiten bei der Kombination Moodle und PHP-Accelerator gibt).
  • Einen erreichbaren Datenbankserver: MySQL oder PostgreSQL werden direkt unterstützt und für die Benutzung von Moodle empfohlen. MySQL ist die Wahl für die meisten Installationen weil es so verbreitet ist, aber es gibt einige Argumente für die Nutzung von PostgreSQL, speziell wenn große Moodle Systeme mit vielen Beutzern zu erwarten sind. Die minimale Version für MySQL ist 3.32. Bitte beachten Sie das die minimale Version MySQL 4.1.16 ist für die Unterstützung von Moodle 1.6 (viele Linux Distributionen installieren eine ältere Version, kontrollieren Sie die Version wenn Sie planen die Version 1.6 zu installieren).

Die meisten Anbieter für Web-Space bieten bereits diese Voraussetzungen. Wenn Sie breits einen Vertrag haben, der nicht die Voraussetzungen erfüllt, sprechen Sie mit Ihrem Anbieter (Provider) und fragen Sie warum das so ist, um ggf. eine Lösung zu finden oder einen Providerwechsel anzugehen.

Wenn Sie Moodle auf Ihren eigenen Computer/Laptop installieren wollen, und bisher Ihnen alles erschreckend/abschreckend vorkommt, dann schauen Sie sich die Anleitung: Installation Apache, MySQL und PHP an. Es stellt Ihnen eine Schritt für Schritt Anleitung zur Verfügung um Moodle auf einen PC zu installieren (egal ob es auf einem Windows, Linux oder MacOS Betriebssystem ist).

Zustätzliche Voraussetzungen

Für spezielle Erweiterungen müssen folgende Voraussetzungen vorhanden sein:

PHP Erweiterung:

  • GD Bibliothek und die FreeType 2 Bibliothek für Linux/Unix installationen um dynamische Grafiken der Log-Dateien darstellen zu können.
  • mbstring - wird benötigt für Multi-Byte Zeichenketten Behandlung. (iconv ist auch Voraussetzung für Moodle 1.6)
  • Die MySQL Erweiterung ist Voraussetzung wenn man MySQL Datenbanken einsetzen möchte. Beachten Sie das bei manchen Linux Ditributionen (besonders Red Hat) ist es eine optionale Installation.
  • Die pgsql Erweiterung ist Voraussetzung wenn man PostgreSQL Datenbanken benutzen möchte.
  • Die zlib Erweiterung ist Voraussetzung für zip/unzip funktionalität
  • Andere PHP Erweiterungen sind möglicherweise Voraussetzungen für die optionale Unterstützung spezieller Moodle-Features, speziell externe Authentifikation und/oder Registrierung in den Kursen (z.B. LDAP Anbindung).

Herunterladen und die Dateien an den richtigen Ort kopieren

Es gibt zwei grundlegende Wege um an Moodle heranzukommen:

  • als gepacktes Paket (zip oder tgz)
  • oder über CVS (Concurrent Versions System)

Diese beiden vorgehensweisen sind ausführlich din der Download-Seite beschrieben: http://download.moodle.org/

Nach dem herunterladen und auspacken des gepackten Paketes, oder über das CVS, sehen Sie ein Verzeichnis mit dem Namen "moodle", das viele Verzeichnisse und Dateien enthält.

Sie können das gesamte Verzeichnis in das Dokument Verzeichnis des Web-Servers verschieben, in diesem Fall wird die Moodle Seite über http://yourwebserver.com/moodle angesprochen, oder sie kopieren alles diekt in das Hauptverzeichnis des Webservers um so die Moodle Seite direkt über http://yourwebserver.com.

Wenn Sie das Moodle Archiv auf Ihren PC herunterladen und dann auf den Webserver hochladen möchten, ist es besser das Archiv erst auf dem Webserver auspacken zu lassen. Die meisen Anbieter bieten dafür eine Weböberfläche an (z.B. 1und1).

Verzeichnisstruktur

Sie können ohne bedenken dies kapitel überlesen, hier ist eine kurze Übersicht über die Verzeichnisstruktur des Moodle Systems, um eine Übersicht zu erhalten:

config.php - Beinhaltet wichtige Informationen (z.B. über die Datenbank) und wird erst während der Installation erzeugt.
install.php - das Skript erzeugt die config.php während der Installation
version.php - Definiert die aktuelle Version des Moodle-Systems
index.php - die Startseite des Moodle-Systems
admin/ - Skripte um das Moodle-System zu administrieren
auth/ - Plugin Module für die Authentifizierung
blocks/ - Plugin Module für die Blöcke
calendar/ - gesamter Code für die Benutzung und Anzeige des Kalenders
course/ - Skripte um Kurse zu administrieren und anzuzeigen
doc/ - Dokumentation zum Moodle-System (z.B. diese Seite)
files/ - Skripte zum Anzeigen und administrieren von hochgeladenen Dateien
lang/ - Texte in verschieden Sprachen, ein Verzeichnis pro Sprache
lib/ - Kern-Bibliotheken der Moodle-Skripte
login/ - Skripte für Login und Erzeugen neuer Benutzer
mod/ - alle Moodle Module sind in diesem Verzeichnis zu finden
pix/ - spezielle Grafiken der Moodle-Seite
theme/ - Layoutpakete zum Einstellen des aussehens von Moodle
user/ - Skripte zum Verwalten der Benutzer

Ausführen des Installationsskriptes um die config.php-Datei zu erzeugen

Um das Installations-Skript auszuführen (install.php), versuchen Sie einfach Ihre URL des Moodle-Systems im Browser (z.B. Internet Explorer) aufzurufen. Benutzen Sie dabei folgenden Aufbau: http://yourserver/install.php.

(Das Installationsskript setzt ein Session-Cookie. Wenn Sie eine Popup-Warnung bekommen akzeptieren Sie das Cookie!)

Moodle erkennt beim ersten Aufruf der Seite, das eine Installation/Konfiguration notwendig ist und wird über Verschiedene fenster Sie durch die Installation führen und damit die Datei config.php erzeugen. Am Ende dieser Installation wird Moodle versuchen diese Datei an der richtigen Stelle auf dem Webserver abzulegen, bzw. Sie können die Datei auch über einen Button herunterladen und anschließend über ein FTP-Programm an die richtige Stelle hochladen.

Während der Installation testet das Installationsskript die Servereinstellungen und gibt Lösungsvorschläge falls Probleme auftreten. Für die meisten Probleme sollten diese Vorschläge ausreichen. Sollten Sie keine Lösung umsetzen können, lassen Sie sich nicht so schnell entmutigen, schauen Sie auf dieser Seite nach weiteren Informationen die Ihnen hilfreich sein könnten.

Kontrolle der Webserver-Einstellungen

Firstly, make sure that your web server is set up to use index.php as a default page (perhaps in addition to index.html, default.htm and so on). In Apache, this is done using a DirectoryIndex parameter in your httpd.conf file. Mine usually looks like this:

DirectoryIndex index.php index.html index.htm

Just make sure index.php is in the list (and preferably towards the start of the list, for efficiency).

Secondly, if you are using Apache 2, then you should turn on the AcceptPathInfo variable, which allows scripts to be passed arguments like http://server/file.php/arg1/arg2. This is essential to allow relative links between your resources, and also provides a performance boost for people using your Moodle web site. You can turn this on by adding these lines to your httpd.conf file.

AcceptPathInfo on

Thirdly, Moodle requires a number of PHP settings to be active for it to work. On most servers these will already be the default settings. However, some PHP servers (and some of the more recent PHP versions) may have things set differently. These are defined in PHP's configuration file (usually called php.ini):

magic_quotes_gpc = 1    (preferred but not necessary)
magic_quotes_runtime = 0    (necessary)
file_uploads = 1
session.auto_start = 0
session.bug_compat_warn = 0

If you don't have access to httpd.conf or php.ini on your server, or you have Moodle on a server with other applications that require different settings, then don't worry, you can often still OVERRIDE the default settings.

To do this, you need to create a file called .htaccess in Moodle's main directory that contains lines like the following. This only works on Apache servers and only when Overrides have been allowed in the main configuration.

DirectoryIndex index.php index.html index.htm
<IfDefine APACHE2>
    AcceptPathInfo on
</IfDefine>
php_flag magic_quotes_gpc 1
php_flag magic_quotes_runtime 0
php_flag file_uploads 1
php_flag session.auto_start 0
php_flag session.bug_compat_warn 0

You can also do things like define the maximum size for uploaded files:

LimitRequestBody 0
php_value upload_max_filesize 2M
php_value post_max_size 2M
    

The easiest thing to do is just copy the sample file from lib/htaccess and edit it to suit your needs. It contains further instructions. For example, in a Unix shell:

cp lib/htaccess .htaccess

Creating a database

You need to create an empty database (eg "moodle") in your database system along with a special user (eg "moodleuser") that has access to that database (and that database only). You could use the "root" user if you wanted to for a test server, but this is not recommended for a production system: if hackers manage to discover the password then your whole database system would be at risk, rather than just one database.

Bear in mind that currently (as of 1.5.x) Moodle doesn't work with MySQL 5.x's new "STRICT_TRANS_TABLES" setting. So if you are using MySQL 5.x, edit MySQL's configuration file (called "my.ini" in Windows and "my.cnf" on Unix/Linux) and comment out that option (or simply delete it). You have to restart MySQL after changing this setting.

If you are using a webhost, they will probably have a control panel web interface for you to create your database.

The Cpanel system is one of the most popular of these. To create a database in Cpanel,

  1. Click on the "MySQL Databases" icon.
  2. Type "moodle" in the database field and click "Add Database".
  3. Type a username and password (not one you use elsewhere) in the respective fields and click "Add User".
  4. Now use the "Add User to Database" button to give this new user account "ALL" rights to the new database.
  5. Note that the username and database names may be prefixed by your Cpanel account name. When entering this information into the Moodle installer - use the full names.

If you have access to Unix command lines then you can do the same sort of thing by typing commands.

Here are some example Unix command lines for MySQL (the red part is for Moodle 1.6 and later, leave it out for Moodle 1.5.x or earlier):

  # mysql -u root -p
  > CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; 
  > GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,ALTER ON moodle.* 
          TO moodleuser@localhost IDENTIFIED BY 'yourpassword'; 
  > quit 
  # mysqladmin -p reload
   

And some example command lines for PostgreSQL:

  # su - postgres
  > psql -c "create user moodleuser createdb;" template1
  > psql -c "create database moodle with encoding 'unicode';" -U moodleuser template1
  > psql -c "alter user moodleuser nocreatedb;" template1
  > psql -c "alter user moodleuser with encrypted password 'yourpassword';" template1
  > su - root
  # /etc/init.d/postgresql reload

Creating a data directory

Moodle will also need some space on your server's hard disk to store uploaded files, such as course documents and user pictures.

The Moodle installer tries hard to create this directory for you but if it fails then you will have to create a directory for this purpose manually.

For security, it's best that this directory is NOT accessible directly via the web. The easiest way to do this is to simply locate it OUTSIDE the web directory, but if you must have it in the web directory then protect it by creating a file in the data directory called .htaccess, containing this line:

deny from all

To make sure that Moodle can save uploaded files in this directory, check that the web server software (eg Apache) has permission to read, write and execute in this directory.

On Unix machines, this means setting the owner of the directory to be something like "nobody" or "apache", and then giving that user read, write and execute permissions.

On Cpanel systems you can use the "File Manager" to find the folder, click on it, then choose "Change Permissions". On many shared hosting servers, you will probably need to restrict all file access to your "group" (to prevent other webhost customers from looking at or changing your files), but provide full read/write access to everyone else (which will allow the web server to access your files).

Speak to your server administrator if you are having trouble setting this up securely. In particular some sites that use a PHP feature known as "Safe Mode" may require the administrator to create this directory properly for you.