Installation von Moodle auf Ubuntu

Wechseln zu: Navigation, Suche

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

Baustelle.png Diese Seite ist noch nicht vollständig übersetzt.

Baustelle.png Diese Seite wird derzeit von Manfred Roos übersetzt. Bei Änderungsvorschlägen nehmen Sie bitte direkt Kontakt mit dem Übersetzer auf.

Benötigt werden

  • Ubuntu 8.04 LTS server CD
  • Ein Desktop-Rechner auf x86 Basis mit Laufwerk, Tastatur, Monitor, Maus and einer Internetanbindung.
  • Zeitbedarf für die Installation: ca. 1 Stunde

Schritt für Schritt Anleitung

Installation von Ubuntu

Legen Sie die Ubuntu CDROM ins Laufwerk und starten Sie Ihren Rechner, so dass das System beim Hochfahren von der CDROM bootet.

  • Wählen Sie den Menüpunkt Install Ubuntu Server auf dem Startbildschirm aus.
Ubuntu 8.04 Startbildschirm

  • Als nächstes werden Sie dazu aufgefordert, die Sprache auszuwählen und dem zu installierenden Server einen Namen zuzuweisen (z.B. moodletest).
Ubuntu 8.04 Sprachauswahl
Ubuntu 8.04 Rechnernamen eingeben

  • Bei der Festplattenpartitionierung werden wir im Rahmen dieser Anleitung die Vorgaben von Ubuntu übernehmen. Eine individuelle Aufteilung der Festplatte sollte von einem erfahrenden Systemadministrator vorgenommen werden.
Festplatte partitionieren

Ubuntu 8.04 Systembenutzer eingeben
Ubuntu 8.04 Proxy

/bootext3200MBbootable (may need to be under cylinder 1024 on your harddrive to be bootable)
/ext310GB(files are relatively static)
swap4GB (4xRAM if you don't have much memory, down to 1xRAM if you have gobs of memory)
/varext326GB(variable content – uses rest of the drive)

Select your timezone. (i.e. Central)

Set clock to Universal Time.

Enter Administrators full name. (i.e. Joe Smith)

Enter account name. (i.e. joesmith)

Enter a secure password. (‘abcde’ is not a good one!)

Let the computer restart.

Log in your account.

Edit the /etc/apt/sources.list file. Remove the # mark on lines 22 and 38 to enable access to the universe package source and universe security updates. You will need to re-enter your account password when sudo asks for it.

sudo nano /etc/apt/sources.list  

Now to get all the security updates.

sudo apt-get update

sudo apt-get dselect-upgrade

Normally you would just use sudo apt-get upgrade.

And reboot to run on the new kernel!

sudo reboot

MySQL installieren

(Kapitel kann übersprungen werden) At this point we'll need to log in again to the server and type:

sudo apt-get install mysql-server php5-mysql

Press Y to continue the install.

Replace the following string NewRootDatabasePassword with a secure password of your own choosing.

There is no space between the -p and the password on the second command.

mysqladmin -u root password NewRootDatabasePassword

mysqladmin -u root -h localhost password NewRootDatabasePassword -pNewRootDatabasePassword

We now need to create the Moodle database and Moodle user in MySQL.

The mysql command will prompt for your NewRootDatabasePassword (from above). Replace NewMoodleDatabasePassword with a secure password of your own choosing.

mysql -u root -p
> GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY 'NewMoodleDatabasePassword';
> GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY 'MoodleBackupPassword';

The above also creates a backup user moodlebackup so that you can use mysqldump to make database backups without accident.

Postgresql installieren

(Kapitel kann übersprungen werden)

At this point we'll need to log in again to the server and type:

sudo apt-get install postgresql-8.1 php5-pgsql

Press Y to continue the install.

We now need to create the database user 'moodleuser'.

sudo -u postgres createuser -D -A -P moodleuser

Enter in a NewMoodleDatabasePassword here, then answer 'N' to the question.

We now need to create the database 'moodle' for the user 'moodleuser'. You'll need to enter the password that you just created.

sudo -u postgres createdb -E utf8 -O moodleuser moodle

Let's now secure the postgresql database with an admin password.

sudo -u postgres psql template1
# ALTER USER postgres WITH PASSWORD 'NewAdminDatabasePassword';
# \q

Edit the file '/etc/postgresql/8.1/main/pg_hba.conf' and on line 79 change the words ident sameuser to md5.

sudo nano /etc/postgresql/8.1/main/pg_hba.conf

Restart the database so everything is fine.

sudo /etc/init.d/postgresql-8.1 restart

Apache installieren

The following mod-security, ldap, and odbc libraries are optional.

sudo apt-get install apache2 libapache2-mod-php5 php5-gd

sudo apt-get install libapache2-mod-security php5-ldap php5-odbc

Restart Apache

sudo /etc/init.d/apache2 restart

Note: To install Moodle 2.0 for the current ubuntu, you need to install PHP from an external repository --Olli Savolainen 19:28, 10 April 2009 (UTC)

Install other software

On the command line, type:

sudo apt-get install openssh-server unattended-upgrades

sudo apt-get install unzip zip aspell-en aspell-fr aspell-de aspell-es

sudo apt-get install curl php5-curl php5-xmlrpc

sudo apt-get install clamav-base clamav-freshclam clamav

Press Y to continue the install after each of these apt-get commands.

The clamav package will support virus checking on file uploads into Moodle. May have to run it again to configure properly.

Additional languages are available for aspell.

Moodle Installation

On the command line, type:

cd /var/www

sudo wget

sudo tar -zxf moodle-latest-19.tgz

in ubuntu 8.04 it should be:
sudo tar zxf moodle-latest-19.tgz

sudo mkdir /var/moodledata

sudo chown -R www-data:www-data /var/moodledata
where www-data is whatever user/group was created automatically when apache was installed.

We now need to edit the location of the default web site. On lines five and ten, replace /var/www/ with /var/www/moodle/. Restart Apache. (See page comments for more details on this instruction.)

sudo nano /etc/apache2/sites-available/default  

sudo /etc/init.d/apache2 restart

Configure Moodle website

ifconfig (look for your server’s ip address on the 2nd line).

On another computer open a web browser and put in your server address. Make sure your web browser is set to accept cookies.

Complete the Moodle install using a secure username and password.

Go to a bar for a few hours.

Come back and tell your boss that you FINALLY got the test server running.

Other Resources

Siehe en:Step-by-step_Install_Guide_for_Ubuntu und en:Step-by-step_Install_Guide_for_Ubuntu_using_apt-get