Install these packages (if you've not already done so). See Installing Apache,
MySQL and PHP or refer to the respective user manuals. Using apt-get, aptitude
or synaptic you can install these very easily.
GD library
php5-gd is optional
The mentioned packages are installed along with the dependencies depending
on what was already installed on your Debian system.
Now you may fire up a browser and type localhost to check whether the apache2
default page is shown,
You can edit the apache configuration files using the text editor gedit by
gedit /etc/apache2/apache2.conf
Now we must make a slight change in the php5 configuration file. Open it using
gedit /etc/php5/apache2/php.ini
Sometimes these entries are provided as example lines being commented out .
You can remove the commenting to activate the entries.
To test the php installation, you can create a text file named phpinfo.php with the
contents <?phpinfo()?> and save it at /var/www. Restart apache with the
command below. Now access this file through the browser localhost/phpinfo to
check the installation of php. Mysql installation is already there. Give it a root
password using
mysqladmin -u root password "yourpassword"
/etc/init.d/apache2 restart
For zip file, use unzip <your_file>. For tgz(tar.gz), use tar -zxvf <yourfile>. You can also use any of the GUI front-ends such as file-roller or ark.
You will get a folder moodle (or moodle-1.5.2 or something similar).
Login as root (if you have not already done so): su.
If you use additional authentication methods, you may need to install other php
libraries, such as php5-imap if you use IMAP to authenticate your users.
Note that on a secure production server, you will want to create a different user
than root to access the database.
Now log in
mysql -u root -p
Get the latest version of Moodle 1.9 (check for the most recent released version
or the version you are most comfortable with. It may be earlier or later than 1.9
stable. Use the European Union CVS server (you can replace eu with uk, es, or
us in this step if you wish)
cvs -z3 -d:pserver:anonymous@eu.cvs.moodle.org:/cvsroot/moodle co -r
MOODLE_19_STABLE moodle
Around line 17, comment out the line for the default page:
# RedirectMatch ^/$ /apache2-default/
You can change other values like ServerAdmin if appropriate. For all changes,
you should restart Apache for the new settings to take effect.
/etc/init.d/apache2 restart
Setup Moodle
If you are only going to test Moodle on your internal network, just enter the local
IP address as the web address. You can find the local IP address under DHCP
by typing
ifconfig eth0
If you have a web address that points to your server, use that instead.
From a browser on another machine, enter
http:// ----- your web address -----
For Password, enter the password for the database that you created earlier
Continue through the dialogs and select Unattended operation and set up the
Moodle server.
Install cron
Moodle needs a periodic call to do maintenance work like sending out emails,
cleaning up the database, updating feeds, etc. To run the cron every 10 minutes,
do the following
Rather than learning vi, use the nano editor
export EDITOR=nano
This will allocated more memory and allow files to be uploaded up to 80MB. This
should be enough for most multi-media files. Hard drive space is cheap and the
default is only 2MB. It is recommended that you change the settings to the
following values:
memory_limit = 40M
post_max_size = 80M
upload_max_filesize = 80M