Old:Installing Moodle 1.9.1

From The Uniform Server Wiki
Revision as of 16:26, 21 June 2013 by BobS (talk | contribs) (BobS moved page Installing Moodle 1.9.1 to Old:Installing Moodle 1.9.1 without leaving a redirect)
Jump to navigation Jump to search

MPG UniCenter

Installing Moodle 1.9.1 3.5-Apollo

Moodle 1.9.1
Uniform Server 3.5-Apollo.

I mentioned to a friend I was moving Moodle over to Uniform Server’s Wiki and asked what he would like to see in the installation instructions. I was a little surprised at his response! No geeky stuff just a fully working downloadable package would do nicely.

I have gone for a British compromise and provided both a full downloadable package comprising Uniform Server 3.5-Apollo with Moodle 1.9.1 and some geeky stuff should you wish to upgrade in the future.

Background

Searching the Internet I found something interesting Uniform Server uses a RAM disk. That was new to me I suppose the Uniform Server team had second thoughts of wasting your valuable memory like this, however it is possible, may even write a user guide on how to do it. Uniform Server does NOT use a RAM drive it runs from either a hard drive or USB memory stick. Strange how misconceptions prevail on the Internet.

Uniform Server creates a virtual drive (default W) and uses this, it appears to be running on drive W in reality it is running code from where Uniform Server was installed. If drive W is occupied by a real physical drive Uniform Server has a selectable option allowing it to run from another drive letter.

During installation Moodle picks up the true environment for its operation, even reports potential problem areas that need looking at. However it is not draconian in any way; I chose to ignore some options such as increasing memory size, using curl and Openssl these are not required for a personal installation.

Install it have a play you can make changes after installation.

Top

Preparation

The first task is to download the appropriate files and unzip them. You will notice I am using disk G the only reason for this, my C drive is getting full. If you wish you can save the downloaded files to a new folder or diffrent hard drive and work from there, it is of little consequence; use whatever you are comfortable with.

Extract Uniform Server

  1. Download the software package UniServer3_5.exe (about 7.02 MB) from Source Forge for latest release check Uniform Server's web site
  2. Save the file to drive G: (Alternatively use any drive or folder of your choice)
  3. The file is a self-extracting archive, double click to start the extraction process. Creates a folder named Uniform Server containing all folders and files associated with the servers.


Note: Latter on you will need to start and stop Uniform Server the files to do this are located in folder G:\Uniform Server

  • Server_Start.bat --- Double click to start both Apache and MySQL servers
  • Stop.bat --- Double click to stop both Apache and MySQL servers

Extract and Install Uniform Server update

  1. Download file uc_bug_fix_2.exe save it to folder Uniform Server.
    MD5 = a4828c7818ab6a68e5c2daaf3da19491
  2. The file is a self-extracting archive, double click to start the extraction process, allow overwrite all, updates Uniform Server.

Moodle

  1. Download the software package moodle-weekly-19.zip (about 13.4 MB) from Moodle Downloads for latest release check the Moodle web site
  2. Save the file to drive G:
  3. UnZip the file moodle-weekly-19.zip (Double click on the file and follow the Windows extraction instructions). Let windows extract all folders and files to a folder of your choice or just accept the defaults.

Copy Moodle to Uniform Server

  1. Open the extracted Moodle folder G:\moodle-weekly-19 this contains one folder named moodle
  2. Copy this folder and all its contents to the Uniform Server's folder G:\Uniform Server\udrive\www

Note: To save disk space (about 54.9MB) delete the folder G:\moodle-weekly-19

That completes the preparations.

Top

Installation

The followin is a step-by-step guide for installing Moodle on Uniform Server.

Uniform Server

This will be a personal installation of Moodle not intended to be put on line, the servers are inherently secure hence nothing to change. The MySQL server already contains a user named root and password root these defaults will be used during Moodle installation.

Before performing a Moodle installation a moodle database needs creating on the MySQL server as follows:

  1. Start Uniform Server: by double clicking on Server_Start.bat located in folder G:\Uniform Server
    Wait for your browser to start, apanel will be displayed (main control page for Uniform Server).
    You may be challenged by your firewall, allow all connection on all ports.
  2. Click on phpMyAdmin (menu to the left) This displays the main control page for your MySQL server.
  3. Create new database: by typing moodle into the text field and click create.

Top

Moodle Installation

All that remains is to run the Moodle nstaller script install.php. Type the following into your browser address bar.

http://localhost/moodle/install.php

Most of the pages display information just click either the next or continue button to proceed to the next page. Item 4 requires the database user name and password for a personal installation we are using the defaults root and root. The following shows what to expect during installation:

  1. Choose a Language: English (en) Next
  2. Checking your PHP Settings: passes all click NEXT
  3. Confirm Location of Moodle installation:
    • Web address http://localhost/moodle
    • Moodle Directory W:\www\moodle Grayed out
    • Data Directory W:\/moodledata
    • For a default installation of Uniform Server these are correct click Next
  4. Database configuration:
    • Type: MySQL(mysql)
    • Host Server: localhost
    • User: root (Uniform Servers default)
    • Password: root (Uniform Server default)
    • Tables prefix: mdl_
    • Click Next
  5. Server Checks: You are informed to check, curl, openssl, xmlrpc, and register turn globals off, these are not a real problem for a personal installation NEXT
  6. Installation, Option of download a language pack NEXT
  7. Configuration completed: config.php has been successfully created Continue
  8. You have read the copyright notice! YES
  9. Current release information(leave Unattended operation un-checked): Continue
  10. Takes some time wait as the install takes place: Database was successfully updated Continue
  11. Again wait, Workshop tables have been setup correctly Continue
  12. Truefalse tables have been set up correctly, Continue
  13. Datbase was successfully upgraded Continue
  14. Several things social, tagflickr etc set-up correctly Continue
  15. Paypal tables have been set up correctley Continue
  16. xml and other plugins set up correctly Continue
  17. No warnings scroll to the continue button Continue
  18. user tables have been set up corrctly Continue
  19. Admin set-up: On this page you should configure your main administrator account which will have complete control over the site. Make sure you give it a secure user name and password as well as a valid email address. You can create more admin accounts later on. Fill in details and click Update Profile
    • Username:boss
    • New password fred123
    • First name: Fred
    • Surname: Smith
    • Email address: fred@smith.com
    • Email activated: This email address is enabled
    • City/Town: Cambridge
    • Select acountry: United Kingdom
    • Timezone: Server's local time
    • Prefered language:English
    • Leave rest blank
    • Click Update profile
  20. Front Page settings: This page allows you to configure the front page and name of this new site. You can come back here later to change these settings any time using the Administration menus. Fill in details click Save Changes
    • Full site name: MPG Test
    • Short name:MPG
    • Front page description:
    • Description: Personal installation of Moodle running on Uniform Server 3.5-Apollo
    • Click: save changes
  21. Finished: This is your main admin page you can continue setting up Moodle or log out

Note: Steps 19-20 I entered dummy information. You can change this information from admin at any time, however make sure you remember your admin password and name.

Top

Stopping Moodle

  1. Logout from admin
  2. Double click on Stop.bat located in folder G:\Uniform Server

Top

Starting Moodle

  1. Double click on Server_Start.bat located in folder G:\Uniform Server
  2. In your browser address bar type http://localhost/moodle/

Note: You can run apanel at any time by typing http://localhost/apanel into your browser address bar.

Top

Memory Stick

To run Moodle from a Memory stick, copy the folder G:\Uniform Server and all its content to whatever drive your memory stick is on.

Note: This process is not fast; writing 138 MB (UniServer plus Moodle) took just over 20 minutes. In the same vain do not expect exceptional performance, Moodle uses a large database hence is slow when run from a memory stick. That said I found it just about acceptable.

Top

Cron

To keep Moodle happy you need to periodically run the cron.php script.

For a personal implementation of Moodle you can run cron.php occasionally by typing the following into your browser address bar:

http://localhost/moodle/admin/cron.php

Top

Summary

That completes installation; you have Moodle running on Uniform Server. Either run it from your hard drive or copy to and run it from a memory stick.

If drive W is a limitation (already in use) change the file as shown in the next section. This will allow you to select any free drive for this you start the servers using Start.vbs which provides options to start MySQL and change the drive letter to use.

Top

Default drive correction

During installation Moodle uses the drive letter (default W) it is installed from and hard wires it into a configuration file. This means you cannot use Start.vbs to change the drive letter and expect Moodle to run. A solution to this problem requires changing the Moodle configuration file config.php.

Changes highlighted in bold:

config.php (located in folder G:\Uniform Server\udrive\www\moodle)
<?php  /// Moodle Configuration File 

//MPG 22-6-08: This determins real drive letter, reconstructs paths accordingly
//Upgraded to Uniform Server 3.5-Appolo Moodle 1.9.1

$path = realpath(dirname($_SERVER['config.php']));  // path of this file
$pathArray = explode("\\",$path);    // split to give all elements of current path
$mpgdataroot="$pathArray[0]/\moodledata";    // moodle data root folder
$mpgdirroot="$pathArray[0]\\$pathArray[1]\\$pathArray[2]";    //moodle root folder correct slashes
//END MPG

unset($CFG);

$CFG->dbtype    = 'mysql';
$CFG->dbhost    = 'localhost';
$CFG->dbname    = 'moodle';
$CFG->dbuser    = 'root';
$CFG->dbpass    = 'root';
$CFG->dbpersist =  false;
$CFG->prefix    = 'mdl_';

$CFG->wwwroot   = 'http://localhost/moodle';

//Changed to pick up correct paths - mpg
//$CFG->dirroot = 'W:\www\moodle';
//$CFG->dataroot = 'W:\/moodledata';
$CFG->dirroot = $mpgdirroot;
$CFG->dataroot = $mpgdataroot;

$CFG->admin     = 'admin';

$CFG->directorypermissions = 00777;  // try 02777 on a server in Safe Mode

require_once("$CFG->dirroot/lib/setup.php");
// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,
// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.
?>

Top

Full download

Download the following file uc_us35_moodle191.exe.exe (18.2MB) save it to any folder of your choice.

MD5 = 9cebf61986ec7dd398c079b7ad8eb2c32

The file is a self-extracting archive; double click to run, no need to change the path.

You can either run the full package locally on an hard disk or copy folder Uniform Server and all its content to a USB stick.

Running:

  1. Run Uniform Server double click on Server_Start.bat
    Wait for servers to start, browser will open if not already running.
  2. To access Moodle type the following into browser address bar: http://localhost/moodle/
  3. Login name and password:
  • Name: boss
  • Password: fred123

Well that’s the easy bit over with now all you need to do is learn how to use Moodle enjoy.

Top


Ric