Moodle is a LMS (Learner Management System) commonly used in schools and universities. Moodle allows teachers and students to share resources, assess knowledge and more. The biggest advantage Moodle has over its competitors, is the ability to freely tweak the source code to meet client needs.

For IT staff interested in testing Moodle, I have created this tutorial for quickly installing Moodle on a machine running Ubuntu Server 13.10. This tutorial starts with a clean install of Ubuntu 13.10 Server. Optionally, I have also installed OpenSSH server, for remote configuration.

Update available lists packages:

sudo apt-get update

Install all available updates:

sudo apt-get -y upgrade

Install Moodle required software (Apache, MySQL and PHP):

sudo apt-get -y install apache2 libapache2-mod-php5 mysql-server php5-curl php5-gd php5-intl php5-json php5-mysql php5-xmlrpc

When prompted set a MySQL root password:

Download the Moodle 2.6.2+ archive:

curl -L -O http://downloads.sourceforge.net/sourceforge/moodle/moodle-latest-26.tgz

Extract Moodle archive into Apache web documents directory:

sudo tar -zxf moodle-latest-26.tgz -C /var/www/

Set www-data as the directory's group:

sudo chown -R root:www-data /var/www/moodle

Recursively give the group read, write, execute access to the Moodle directory:

sudo chmod -R 770 /var/www/moodle

Create a moodledata directory outside of the Apache web documents directory:

sudo mkdir /var/moodledata

Set www-data as the directory's group:

sudo chown -R root:www-data /var/moodledata

Recursively give the group read, write, execute access to moodledata:

sudo chmod -R 770 /var/moodledata

Now we need to setup a database for Moodle. Log into MySQL, you will be prompted to enter the MySQL root password, set earlier:

mysql -u root -p

Create a Moodle database and set the default character set:

CREATE DATABASE moodledb;

ALTER DATABASE moodledb DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

Create a Moodle user and grant sensible access to the Moodle database.

CREATE USER 'moodle'@'localhost' IDENTIFIED BY 'p@ssw0rd';

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodledb.* TO 'moodle'@'localhost';

quit

Open a web browser and go to the hostname or IP address of the server forwardslash moodle (e.g. 192.168.1.20/moodle). The remaining steps of the install proccess involve clicking 'Next' several times, entering the Moodle database configuration and setting up a Moodle admin account. Once done, you will be able to explore the features and possibilities Moodle has to offer.

Comment