I am investigating the ideal OS for Moodle hosting.
I have tried Damn Small Linux, too damn scaled down for Moodle, Fedora Core 4, my rust bucket of a server can't handle it very well.
Can any one recommend an operating system, must be linux, won't use too much RAM, easy to setup and config for Moodle.
This is exactly what I'm using right now.
I'll look into it.
In case this won't suit, any one else?
Thank Penny, Iñaki
I'll give Debian a try on a demo system and see how things work out.
We run most of our Moodle servers under OS X, but the one we have set up for students to bang around on is running on an old Dell using Debian Sarge.
It works great.
We installed a current Moodle package "by hand", though, rather than using the one that comes with it.
My student is having problems installing apache-2 on ubuntu. The file path changes to apache2 and he can't find all necessary changes that need to be made to the the configuration files. If anyone has had a similar problem, please let me know.
I haen't experienced the problem, but I have installed Apache2 on Ubuntu and Debian (where it's almost identical). I presume the goal is to install Moodle on top of it.
Broadly speaking it should be extremely easy on Ubuntu. You need to install one of the apache2-mpm packages (I'd suggest apache2-mpm-prefork), the libapache2-mod-php4 or libapache2-mod-php5, as well as the db server and php support for that database. If you're using the Ubuntu Moodle package, I think you probably need PHP v5.
At that point apache2 will be setup such that
/etc/apache2 -> general settings directory
/etc/apache2/conf.d/ -> packaged config files for extra packages such as moodle
/etc/apache2/mods-available -> module configuration files
/etc/apache2/mods-enabled -> symlinks to files in mods-available to make them live
/etc/apache2/sites-available -> site configuration files (eg one per vhost)
/etc/apache2/sites-enabled -> symlinks to files in sites-available to make them live
Personally I think it's a rather elegant way to do things and when you have a lot of sites, can really be nice and manageable.
Thanks Brett (with three!)
But alas, that page is the one that he refered to. As you can see there is no reference to appache2 and I think that that is needed for some reason. But perhaps not. Perhaps only for his particular server, which makes it all the less Moodle relevant.
That looks like a shiny new bub you are holding! Congrats!
Try this link for a more detailed Apache2 installation guide: http://www.howtoforge.com/perfect_setup_ubuntu_5.10_p5
In fact, the entire 6 page tutorial is a very good guide for installing "ISPConfig" on Ubantu 5.10. ISPConfig is an open source hosting control panel and sets a server up as a fully functional, web hosting server.
We were running moodle on FC4 and RHE at one point, but switched to Gentoo. On a moderately powerful server we noticed at least a 40% RAM usage decrease, be it down to Red Hat "bloat" or just the fact that everything is optimised for the system in question and built on an as-you-need-it basis resulting in less overhead. Plus you can go in for much more compile-end LAMP tuning.
If you are looking for performance and willing to put in the effort, as a webserver, Gentoo takes some beating, and it's easier than LFS...
I tried Debain Network Install, but it was taking an age, for some reason our broadband has halfed in speed!
I am trying Ubuntu as I have a lot of experence with it as my main OS.
Thanks for your help,
If you're trying Ubuntu then you may want the server version rather than the desktop, since you mention low ram.
There's not a lot of difference between Debian and Ubuntu really, except the supported architectures and the set of packages that are considered core, and so are expected to work within a stable release set.
Ubuntu is tracking a moving target, so has a smaller set of architectures and a smaller set of packages in the stable release set. Debian has a huge stable release set of packages (including Moodle) and so it releases much less frequently but tends to be more stable.
We run extensively on Debian here (200 or so Debian-based servers, which is probably around 90%), but we do also have a few Ubuntu servers where we want a faster moving environment - particularly multi-opteron database servers. On the other hand, many of our desktop systems are Ubuntu (maybe 40, which is about 70%), because that faster release rate is more important for Linux desktop applications at this stage.
The Ubuntu server version is essentially the same, but it installs a less comprehensive system by default (i.e. excludes X etc.) and includes kernels more suited to server work.
I am also a Debian user. I am about to get in some dual core dual Opteron boxes. One will be a dedicated mysql box and then a couple of front ends. See any benefit of Ubuntu ala your mention of the multi proc db server? I am actually only starting with one Opteron 265 on the DB server to begin with (but dual on the web front ends) as I read that the 3rd, 4th processors don't do as much for mysql performance (ie it is really tuned for dual processors). I figure I will put some monitoring on the box and add a cpu if it maxes out before the drives do (8 scsi 15k drives in a raid 10).
For PostgreSQL the performance does scale fairly well with multiple processors where there are concurrent queries hitting the database. I/O obviously also has a big effect but with large amounts of RAM the data for many read operations are in the filesystem cache.
No reason I can see that MySQL wouldn't be the same unless the architecture is such that all queries are performed by some central process. I don't think that they are, but it would be easy enough to see by running half a dozen slow queries in parallel and looking at top to see if they were sharing the CPU or not.
Similarly, its very likely that Ubuntu will have newer versions of MySQL than Debian - especially on Dapper Drake which is due next month. Ubuntu has also had longer official support for AMD64 (although the unofficial AMD64 port of Debian has been around for several years and is just awaiting a mirror reorganisation to get into the main archive).
So if it is a dedicated database server, presumably firewalled away from the internet, then I wouldn't hesitate to use Ubuntu on it.
MySQL has been fully multi-threaded for years
Look at CentOS 4 which is a white box version of Red Hat Enterprise. I am using it for standalone and cluster server environments (currently 8 servers). These were demonstrated to great affect at the Aust Moodle Conference in July 2005, inclusding running 2 workshops on the setups. It is worth a look
Dont know where "Linux is _the_ operating system behind all the distributions you have mentioned!" came from?
Still, all the distributions the OP suggested, DSL and FC, are built on top of Linus' Linux (and RMS' GNU, of course).
Since the discussion is about distributions here are my two cents: A lot depends on what one plans to do. My rough guess is, for most of the "impatient" who are not only planning a test system but want to go into production, Debian offers a good balance:
a) thanks to the user-friendly packaging, incl. Moodle, easy to get going
b) it is quite usable as a _server_ system compared to most of the toys making the headlines.
During this process you get to choose exactly what goes in to your server, rather than ready-built binary packages that were designed to support as much as possible, but ultimately come with more overhead. No YUMming or apt-getting php-gd for Moodle, and equally php doesn't need to be built with firebird support!
Custom compiles allow you to ensure for instance that apache is not built with a load of unnecessary modules, or 2.2 can be build with the newly enhanced MPM threading modal, etc, which is why many web hosts opt for this.
The easiest way to go about this IMO is with a source-based distribution; plus OS's like BSD and Gentoo lend themselves far more readily to general performance tweaking. When building the Linux kernel, for instance, you can choose to enable certain low-level file passthru streaming options that apache can take advantage of, or remove the performance overhead of, e.g. SELinux.
However getting the "perfect" moodle server could become a very involved process; nevertheless you'll learn a lot in the process , the reward is a powerful server with an uptime measured in years, and what you can do is no longer limited by the number of checkboxes in the Red Hat control center.
Compared to the other distros that have been suggested, this is by no means the "easy" option, but if you want results then Gentoo is a good choice for the reasonably adventurous.
To clarify: The GNU is basically a developer organisation, not (yet) a piece of software!
Thanks everyone for your suggestions on an OS, I have gone for................................. UBUNTU.
Now, "Troubleshooting and customising, please see next topic .
If you can at all, use the server install as opposed to the default one. It should free up RAM, disk and CPU resources (X, gdm, gnome, etc) for the web server. If you're very uncomfortable on the command line this may not suit you but it's worth looking at anyway.
Assuming your machine is from a relatively recent era, you will want plenty of RAM and it's probably the first thing to consider if you have a little money for hardware. If it's not, you'll probably want to look at a new machine
A good way to get extra speed from your PHP install is to use a PHP caching engine which (as I understand it) avoids recompiling the PHP code at each page load. Turck-mmcache is a good, free one but only works currently with PHP4. Development has ceased on turck but it is being forked/rewritten in a new project called eAccelerator. Turck works well with PHP4, eAccelerator still appears a little rough, though I haven't tried it.
As far as I can recall Ubuntu packages Moodle to require php5 so you'll have to deviate from the packaging somewhat if you want to use Turck (or just use the moodle package from debian). Then again, there are other benefits to PHP5.
apt-get install turck-mmcache
is that what you mean?
PS as I mentioned before, this needs PHP4 not PHP5 but the latter is not yet supported in debian as far as I know anyway.
I grabbed a turckmmcache from the Debian archive when Sarge was being released (but turck wasn't in the official release). It's worked great for us on 32-bit Debian -- I hear there are some odd things with PHP (with and without accelerators) in 64-bits.
Martin Y is _very_ young, check his profile!
I believe he is honestly looking for the "best" OS (for him 'course). If I'm not mistaken, the first choice was Ubuntu but had second thoughts about it ;-(
Anyway here "OS" stands for Linux, so why should Linux fans "fight for hours"?
This is all fun and games if you ask me. The reall thing is: use a unix based system and use the one you feel the more confortable with because non one ever gone a give you a straight answer about this.
Its all what the personne feel is the best. there is also a pride associated with My choice. Look how pepole argue about cars brands or the best place to go on vacation, etc.
We all have personal involvement in thoses choises. That being said we can make serious recommandation about how things should be set-up on the server, or on how to optimise this and that.
PHP ist running in fastCGI-mode then, which is not slow (that is a nightmare, maybe it is slow in use with apache). So you don't have to configure suexec-mechanisms to secure the php-module of apache, because PHP-files are excuted using the uid of the file-owner already. Permissons 500 (octal) for the moodle folder and 700 (octal) for the noexec-mounted /moodledata(-partition) are possible.
Load-balancing features are included in lighty, too...