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
From around the web
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
- Why virtualisation hasn't slowed the growth of data
- How to make Google AdWords work for your business
- The curse of sloppily written software
- Paying for your crimes with Bitcoin
- Behind the scenes: tech support for Formula 1
- The security risk of fat fingers
- Why Windows Phone 7 isn't quite ready for business
- When will Microsoft stop fiddling with Windows 8?
- Flash down the pan?
- Metro Style apps vs desktop applications
- Chrome's shine getting lost in translation
- BytePac: the cardboard hard disk enclosure
- How tech loosens our grip on reality
- Hokum watch: Safer Internet Day
- Why I'm deleting Adobe from my PC
- Prepare to be patronised: it's Safer Internet Day
- Dear Sony, Samsung and every other tech company in the world: stop trying to be Apple
- Will Apple's Final Cut Pro X update placate the pros?
- Smartr Contacts for iPhone review
- Switching to Office 365's Outlook Web App
- VeriSign slammed for security breach cover-up
- SAP willing to share HANA with Oracle
- Why using a tablet could harm your health
- New RIM boss: no need for drastic change
- RIM founders fall on their swords
- Slow economy helps boost Red Hat revenue by 23%
- Google+ pages get multiple admins
- One in five companies lack card industry compliance
- Oil industry warns hacking attacks could kill
- British workers fear email monitoring
advertisement

