Old:Installing Moodle 1.9.1
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.
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.
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
- Download the software package UniServer3_5.exe (about 7.02 MB) from Source Forge for latest release check Uniform Server's web site
- Save the file to drive G: (Alternatively use any drive or folder of your choice)
- 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
- Download file uc_bug_fix_2.exe save it to folder Uniform Server.
MD5 = a4828c7818ab6a68e5c2daaf3da19491
- The file is a self-extracting archive, double click to start the extraction process, allow overwrite all, updates Uniform Server.
- Download the software package moodle-weekly-19.zip (about 13.4 MB) from Moodle Downloads for latest release check the Moodle web site
- Save the file to drive G:
- 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
- Open the extracted Moodle folder G:\moodle-weekly-19 this contains one folder named moodle
- 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.
The followin is a step-by-step guide for installing Moodle on 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:
- 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.
- Click on phpMyAdmin (menu to the left) This displays the main control page for your MySQL server.
- Create new database: by typing moodle into the text field and click create.
All that remains is to run the Moodle nstaller script install.php. Type the following into your browser address bar.
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:
- Choose a Language: English (en) Next
- Checking your PHP Settings: passes all click NEXT
- 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
- Database configuration:
- Type: MySQL(mysql)
- Host Server: localhost
- User: root (Uniform Servers default)
- Password: root (Uniform Server default)
- Tables prefix: mdl_
- Click Next
- 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
- Installation, Option of download a language pack NEXT
- Configuration completed: config.php has been successfully created Continue
- You have read the copyright notice! YES
- Current release information(leave Unattended operation un-checked): Continue
- Takes some time wait as the install takes place: Database was successfully updated Continue
- Again wait, Workshop tables have been setup correctly Continue
- Truefalse tables have been set up correctly, Continue
- Datbase was successfully upgraded Continue
- Several things social, tagflickr etc set-up correctly Continue
- Paypal tables have been set up correctley Continue
- xml and other plugins set up correctly Continue
- No warnings scroll to the continue button Continue
- user tables have been set up corrctly Continue
- 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
- New password fred123
- First name: Fred
- Surname: Smith
- Email address: email@example.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
- 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
- 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.
- Logout from admin
- Double click on Stop.bat located in folder G:\Uniform Server
- Double click on Server_Start.bat located in folder G:\Uniform Server
- 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.
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.
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:
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.
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
$path = realpath(dirname($_SERVER['config.php'])); // path of this file
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->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. ?>
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.
- Run Uniform Server double click on Server_Start.bat
Wait for servers to start, browser will open if not already running.
- To access Moodle type the following into browser address bar: http://localhost/moodle/
- 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.