Virtual machines, real users
Posted on 18 Jun 2009 at 11:06
Jon Honeyball keeps up with virtualisation and calls for greener servers, while David Moss continues setting up a course management system.
From here you can select the version of Moodle that you wish to install: I went for the latest weekly build, which at the time of writing was 1.94+, and is indicated as the best choice for a new server installation. (If you're feeling a bit more adventurous you could of course go for the latest build of Moodle 2 beta.) Once it's downloaded, extract the files to a folder called Moodle and put this into the root directory of C:, say (you can choose where to put it - one suggestion is to put it in the wwwroot folder, but I opted to keep it out of there).
You then need to set up PHP to work with Moodle. The settings you apply here will vary depending on which version of Moodle you're using, so I'm only going to mention those associated with this installation. For other settings, you'll need to consult the Moodle documentation. Open up the php.ini file and make sure the following elements are correctly set:
file_uploads = on
magic_quotes_gpc = on
magic_quotes_runtime = off
memory_limit = 128M (large sites may need more than that)
register_globals = off
safe_mode = off
session.auto_start = off
session.bug_compat_warn = off
session.save_handler = files
With regard to the PHP extensions required for Moodle, two items listed in the documentation as being recommended for Moodle version 1.6 or later are php_iconv.dll and php_tokenizer.dll. However, these files aren't needed if you're using PHP 5 or later, as the iconv and tokenizer functions are now built in, so no external DLLs are required in this case.
Other recommended extensions are ctype, curl, and openssl, plus sockets if you're going to use chat, and LDAP if you need to do LDAP authentication. All these extensions shipped with PHP, so using them is simply a matter of un-commenting the relevant sections in the Windows Extensions section of the php.ini file.
The next thing to do is configure IIS 7 to work with Moodle. As Moodle wasn't going to be the only web application running on this server, I fired up the IIS Manager and created a new virtual directory for Moodle under the Default Web Site, then converted it to an application in the same way as I had for PHPMyAdmin back in the July 2009 issue.
Now turn your attention to a file called config-dist.php in the Moodle folder. Create a copy of it and then rename it to config.php, load it into a text editor and you'll see the following values in its first section, Database Setup:
$CFG->dbtype = 'mysql'; // mysql or postgres7 (for now)
$CFG->dbhost = 'localhost'; // eg localhost or db.isp.com
$CFG->dbname = 'moodle'; // database name, eg moodle
$CFG->dbuser = 'username'; // your database username
$CFG->dbpass = 'password'; // your database password
$CFG->prefix = 'mdl_'; // Prefix to use for all table names
Change these values to reflect the ones you've set up for your own database, database user, password and the rest, then in the next section, Web Site Location, you'll need to set the location for your Moodle installation in the following line, which in my testing case was:
$CFG->wwwroot = 'http://localhost/moodle';
Next up is Server Files Location, which you set here (this is my example):
$CFG->dirroot = 'C:moodle';
After that you need to supply the Data Files Location (again, my example):
$CFG->dataroot = 'D:moodledata';
Once it's all done you can turn your attention finally to installing Moodle. See you next month for the next nail-biting instalment.
David Moss
Jon Honeyball
Jon is one of the UK's most respected IT journalists and a contributing editor to PC Pro since it launched in 1994. He specialises in Microsoft technologies, including client/server and office automation applications.
advertisement
- Getting to grips with Microsoft's IT Health Environment Scanner
- Virtualise your servers
- The changing face of travel gadgets
- Build your own distributed file system
- The bulletproof Dell that costs an arm and a leg
- Microsoft Office 2010 Technical Preview: Q&A
- Lawnmowers, the TyTN II and one odd insurance request
- There'll never be a bulletproof OS
- How far can we trust apps?
- Five nice touches in Outlook 2010
- ATI Radeon HD 5970: 42% more expensive in the UK
- Office 2010 Beta – 32-bit or 64-bit – The Choice is Clear
- Why Britain's watchdogs have fewer teeth than goldfish
- Tabbed documents: how to make Office 2010 great
- Outlook 2010 People Pane – does it spell death to Xobni
- Microsoft Outlook 2010 screenshots
- Co-Authoring in Word 2010 and SharePoint Foundation 2010
- Microsoft Outlook 2010 screenshots: Backstage view
- Flash 10.1: Developing for Desktop and Device
- Microsoft Office 2010 screenshots: Recover unsaved items
- Photoshop app arrives on Android
- Google: we won't remove "disturbing" Obama image
- Internet Explorer hit by zero-day misery
- Sky Player shows up in Windows 7
- Tweetlevel reveals most influential Twitterers
- Apple "refuses to repair smokers' Macs"
- Spotify arrives on Symbian
- Chrome OS and Android to "converge over time"
- Microsoft to pay News Corp to stay off Google
- Christmas sales surge knocks out eBay search
advertisement
Printed from www.pcpro.co.uk


