Upload
sandhya-gunness
View
131
Download
2
Embed Size (px)
Citation preview
Development of an E-Learning Platformfor COMESA
MOODLE INSTALLATIONON LINUX
Table of Contents
Step 1. Assumptions and Needs......................................................................................3Step 2. Extract the Moodle installation file....................................................................4Step 3. Configuring Moodle...........................................................................................6Step 4. Finalize all Moodle database tables................................................................10Step 5. Moodle site configuration................................................................................11Step 6. Next Steps.........................................................................................................14
- 2 -
Step 1. Assumptions and Needs
1. Assuming that for the following steps you will be using either your root or a superuser account with the necessary access privileges.
2. Ensure that the following modules have been installed & the processes are running:
Php version 5.1.6 Apache 2.2.3 Mysql 5.0.22 PhpMyAdmin 2.11.3
3. Using phyMyAdmin (http://localhost/phyMyadmin), create a new mysql database & name it “moodle”.
Figure 1: phpMyAdmin interface
For the database user, you can use either a newly created account with all priviledges or the root account.
- 3 -
Step 2. Extract the Moodle installation file
Download (http://www.moodle.org) and extract the Moodle installation file (.tgz format) in the web server root directory (/var/www/html). The compressed files will be extracted to a folder called “moodle”.
Figure 2: Apache root directory
CHANGE FOLDER PERMISSION: Before proceeding with the rest of the installation, it is important to change the permissions for your web folder (/html) to allow the Moodle installation to create some essential files.
Figure 3: KDE Figure 4: GNome
To manually set folder permissions, type from the Terminal prompt:
cd /var/wwwchmod 777 html
- 4 -
Remember that later we need to return to these steps to change the permission back to the more secure setting. When the install is complete, we need to return to the same step but change the permissions to 755 instead of 777.
- 5 -
Step 3. Configuring Moodle
After copying the Moodle installation folder, setting appropriate file permissions on the moodle folder and creating the moodle database, point the browser to: http://localhost/moodle
A. LANGUAGEThe first installation screen offers a choice of Language. Please choose your language and press the Next button.
B. PHP SETTINGSThe second window shows your PHP settings and indicates if PHP is properly installed.
Figure 5: Moodle PHP settings
C. INSTALLATION DIRECTORIES
We will now see the key installation folders. Notice that although it indicates that we need a Data directory, we must create this directory.
- 6 -
Either create a new folder “moodledata” in the /var/www/ directory & set folder permission as in step 2 using a graphical interface or from a terminal type these commands:
cd /var/www/mkdir moodledatachmod 777 moodledata
Figure 6: Moodle installation directories
- 7 -
Possible errors:
1) The “Data Directory” you specified could not be found or created. Either correct the path or create the directory manually.
Solution: Need to enable read & write permission on the moodledata folder.
2) If using ip address for Web address, installation does not continue.
Solution: Set web address as: http://localhost/moodle
D. DATABASE CONFIGURATION
The moodle database must have been already created in step 1. We need to specify the MySql user & password for the database configuration.
Figure 7: Moodle database configuration
- 8 -
E. MOODLE CONFIGURATION FILE
Moodle will then try to create and save the configuration file config.php which contains the moodle settings. If everything is ok, the following screen will appear:
Figure 8: Moodle configuration
The following error message can be obtained if folder permissions have not been well set. To continue with the installation, follow the instructions in the error message.
Figure 9: Moodle configuration error
- 9 -
Step 4. Finalize all Moodle database tables
The Moodle configuration tool will begin setup of multiple database entries. The next few windows simply tell you about the tables and settings and in almost all cases, we simply need to press the continue button. To avoid pressing the continue button each time, select Unattended Operation.
Figure 10: Finalise Moodle database tables
- 10 -
Step 5. Moodle site configuration
After successful completion of the Moodle database tables, the Administration control window will appear. These options are very important as they dictate how the administrative account will operate.
Figure 11: Moodle administrator account
After setting up the administrator account, we need to configure the front page and name of the new site.
- 11 -
Figure 12: Moodle front page settings
The Moodle website (http://localhost/moodle) is now running. Now we can click on the Configuration menu option on the top left menu and customize the website for the intended organization.
Figure 13: Moodle platform
- 12 -
Files & subfolders in the moodle directory (var/www/html/moodle):
Files:o install.php - the script you will run to create config.phpo version.php - defines the current version of Moodle codeo index.php - the front page of the siteo config.php - contains basic settings. This file is automatically
generated during Moodle installation
Subfolders:o admin/ - code to administrate the whole servero auth/ - plugin modules to authenticate userso blocks/ - plugin modules for the little side blocks on many pageso calendar/ - all the code for managing and displaying calendarso course/ - code to display and manage courseso doc/ - help documentation for Moodle (eg this page)o files/ - code to display and manage uploaded fileso lang/ - texts in different languages, one directory per languageo lib/ - libraries of core Moodle codeo login/ - code to handle login and account creationo mod/ - all the main Moodle course modules are in here – (plugins)o pix/ - generic site graphicso theme/ - theme packs/skins to change the look of the site.o user/ - code to display and manage users
- 13 -
Step 6. Next Steps
The Moodle platform has been successfully setup and running on the server. However, prior to connecting this server to a wider network, or allowing others to use the Moodle system, we need to address a few open items:
FOLDER PERMISSIONS: In Step 2, we changed permissions for the webserver folder var/www/html and in Step 3 (Section C) we changed permissions for var/www/moodledata.
Now using the same steps, we need to change the permissions to reflect a more secure web folder where only you can write or modify the files. The permissions should be set 755 or appear similar to this:
Figure 14: Folder permissions
CRON SETUP: Some of Moodle's modules require continual checks to perform tasks. The script that does all this is located in the admin directory, and is called cron.php. This provides a "heartbeat" so that the script can perform functions at periods defined by each module.
Once the Moodle Installation is complete, run the following from your browser to test whether the sript works: http://localhost/moodle/admin/cron.php
Note that we need to install the “automated cron” on the server that is running Moodle. It is very important that the cron.php file is regularly updated (e.g. 5 or 10 minutes).
Setting up cron in Linux:
- 14 -
crontab -e
i
*/10 * * * * wget -q -O /dev/null http://localhost/moodle/admin/cron.php
<press escape>
:wq
crontab -l
SMTP MAIL SETUP: Login on Moodle and set the following parameters to enable the mail feature on Moodle:
Site Administration -> Server -> Email
Figure 15: Mail settings
CREATE CUSTOM DESIGN: It is also important to customize the site for your organization's needs. Use a browser to return to your Moodle site and log in as admin. Once logged in, choose Configuration from the Administration menu on the left. This will allow us to make changes to many features and site design.
For many more themes and design options visit the moodle website (http://www.moodle.org)
MOODLE SITE REGISTRATION: Moodle.org encourages sites that can be reached from the internet to register themselves. A site that has not been registered will find a link for registration in the Site administration block under Notification (http://localhost/moodle/admin/index.php).
Figure 16: Moodle registration
- 15 -