A Moodle Diary

Tuesday, July 05, 2005

Creating a Moodle test site on Unix

To try and squeeze a bit of performance out the old PC that was hosting the Moodle test I decided to scrub Windows and try to install a small Unix OS instead, on the assumption that it wouldn't be as much of a drain on system resources. I picked FreeBSD for the OS as it has a pretty good reputation and also I'm a Mac user and Darwin, the Unix core of Mac OS X, is based on FreeBSD.

I'll not go into detail on the FreeBSD installation process since it's covered pretty clearly in the FreeBSD Handbook. Basically, I downloaded the 3 installer images from the FreeBSD website and burned them onto discs (though it turned out I only needed disc 1). Booting from the 1st CD started the installation process, which took care of re-formatting the hard drive. Following the instructions on the handbook saw me through the process OK, but there were a couple of things worth noting:

  • Be sure to install the FreeBSD Ports Collection, which will let you install the webserver & database software, etc.

  • I didn't bother installing much more than the basic OS, to keep the drain on system resources down. I didn't bother with the X windows system, etc

  • I wanted to use SSH to log into the computer remotely, so I could ditch the monitor and stick the case under a desk. The installer asks if you want to use xinetd, a program that manages network services like SSH & FTP. I said yes to this, and activated SSH on it. A stage or two later in the installation process it asks if you want to use SSH, which I also said yes to. It turns out this is activating another SSH service and I ended up with both running on the computer, which was sticking a bunch of error messages onto the console. Once I realized and turned off one of them, every thing was fine.


Once I had FreeBSD installed and running, I used the Ports Collection to install Apache webserver, PHP, MySQL and Webmin, a program that allows system administration through a web interface. Installation of programs from the Ports Collection is also covered pretty clearly in the handbook. In summary, installing a program from the collection involves navigating to it's directory from the command line and typing 'make install'. The appropriate files are downloaded from the internet and compiled.

Since the Moodle demo I'd been running on Windows hadn't been up for long, I just did a fresh install on the FreeBSD system. Again a MySQL database had to be created beforehand for Moodle, which I created using Webmin. The Moodle software itself just had to be unzipped into the Apache documents directory, and then accessed via a web browser to run the initial configuration scripts.

The Unix Moodle system did run a bit quicker than the Windows one, and I scrounged another 64mb module for the last slot on the machine which gave another little boost. It was a lot more usable and could cope with 3 or 4 users at a time, which was fine for demoing. Once the system was up and running there was little need to use the unix command line. The only times I had to use it were to turn Webmin on and off and to install extra Moodle modules and themes.

4 Comments:

Post a Comment

<< Home