Case Study – Installing Moodle Learning Management System
From Colwiki.org
In this module you will use the skills learned in this course to install the Moodle Learning Management System on both a Linux and Windows based Apache + MySQL + PHP platform. More specifically, you will perform the following
|
|
Contents |
Installing Moodle in Linux
Moodle requires the following pre-requisites:
- Apache Web Server: Moodle is a Web Based system requiring the user to access the system via a web browser. Though Moodle can work on any webserver supporting PHP (including IIS), many installations use the Apache Webserver. Apache is short for Apache HTTP Server Project, a robust, commercial-grade, featureful, and freely-available open source HTTP Web Server software produced by the Apache Software Foundation. It is the most commonly used web server on the internet, and is available on many platforms, including Windows, Unix/Linux, and Mac OS X.
- MySQL: A Learning Management System (LMSA mail transfer agent (MTA) (also called a mail transport agent, message transfer agent, or smtpd (short for SMTP daemon), is a computer program or software agent that transfers electronic mail messages from one computer to another. The term mail server is also used to mean a computer acting as an MTA that is running the appropriate software. An MTA receives mail from another MTA (relaying) or from a mail user agent (MUA). The MTA works behind the scenes, while the user usually interacts with the MUA.MySQL is a popular open source SQL (Structured Query Language) database implementation, available for many platforms, including Windows, Unix/Linux and Mac OS X.
- PHP: PHP is a recursive acronym for PHP: Hypertext Preprocessor. It is a popular server-side scripting language designed specifically for integration with HTML, and is used (often in conjunction with MySQL) in Content Management Systems and other web applications. It is available on many platforms, including Windows, Unix/Linux and Mac OS X, and is open source software.
We will install these pre-requisites on a Red-Hat Linux Box. During installation of RHEL 5 make sure that you install the Webserver option as shown in the screen below:
APACHE INSTALLATION
It is advisable that you install nmap package useful to determine the running services on your linux box. To install nmap navigate to your instlallation media as follows:
$cd /media/CDROM/Server $rpm –i nmap-4.11-1.1.i386.rpm
This will install the nmap package of which you can run
$nmap localhost
Or
nmap <ip_address_of_your_server>
And determine the servers that you are running. You should notice that your port 80 (HTTP Webserver is not running). You can start the apache webserver by running:
$/etc/init.d/httpd start
This will start your apache server. You can perform nmap on the ip address of your host to confirm.
MYSQL INSTALLATION
To install MySQL Server, you will need to install the perl-DBI dependency. This can be done as follows:
$rpm –i perl-DBI-1.52-1.fc6.i386.rpm mysql-5.0.22-2.1.i386.rpm $rpm –i perl-DBD-MySQL-3.0007-1.fc6.i386.rpm mysql-server-5.0.22-2.1.i386.rpm
You can now start the MySQL Service by running:
$/etc/init.d/mysqld start
By default the MySQL database does not come with a superuser password (‘root user’). This is a security risk that you need to seal. To do this run:
$mysqladmin –u root password ‘root2009’;
Replace root2009 with your required root password.
Then restart your mysql database by running:
$/etc/init.d/mysqld restart
Connect to MySQL by running the following:
$mysql –u root –p
Enter the MySQL Password you just created, then press enter, you will see the MySQL Prompt. Create the moodle database by running:
mysql> create database moodle;
MOODLE INSTALLATION
Get the moodle packages from http://download.moodle.org/
$wget http://download.moodle.org/download.php/stable19/moodle-1.9.5.tgz
Then copy the file to the webserver root directory:
$cp moodle-1.9.5.tgz /var/www/html/
Uncompress as follows
$tar –zxvf moodle-1.9.5.tgz
A directory named moodle will be created in your current working directory which should be /var/www/html/. Assign the file the appropriate rights by:
$chown –R apache:apache moodle
Create moodledata directory required by moodledata
$mkdir –p /var/www/html/moodledata $chown –R apache:apache moodledata
Open up your browser and access the moodle installer from the browser as follows:
http://<ipaddress_of_you_computer>/moodle/
Follow through the installation instructions in the installer. Make sure you specify the mysql database as the database you have created while setting up MySQL.
| See http://docs.moodle.org/en/Installing_Moodle for more information and further installation procedures in other Linux/Operating System. |
Installing Moodle in Windows
Installation of the pre-requisites in Windows is made easy through the use of pre-compiled and pre-configured packages that automatically install a pre-configured Apache+MySQL+PHP.There are many packages of this nature available, but the author of this course guide recommends XAMPP from “apachefriends”.
- For instructions to install Apache, MySQL and PHP on Windows follow the Instructions on http://docs.moodle.org/en/Windows_installation_using_XAMPP. This will install the pre-requisites required for moodle installation.
- To install moodle on Windows follow the Instructions on the Moodle Site: http://docs.moodle.org/en/Complete_install_packages_for_Windows
This work is licenced under a Creative Commons - By Attribution Licence - Share Alike License.
