Windows server: Installing Moodle using XAMP

Windows server: Installing Moodle using XAMP

by Mike Smith -
Number of replies: 17
I have read as advised the relevant Moodle docs on installing Moodle and the route using XAMP looks to be the more straight forward. Would this method be suitable for a production server for a large number of students. I am a moodle novice but learning fast! The server uses windows 2003 and Internet Explorer v6
Mike
Average of ratings: -
In reply to Mike Smith

Re: Windows server: Installing Moodle using XAMP

by Dennis Flynn -
I feel it's important to understand all softwares running on a production server. For that reason, I'd suggest you stay away from the "packages" and install and configure each software individually. Decide if you'll use IIS or Apache, and setup a website to make sure you have a functioning webserver. Install and configure PHP, and setup a php page to make sure everything's working (i.e. phpinfo.php). Install and configure MySQL, create a database user for your Moodle database, create your Moodle database, assign the user you created all privileges except Grant. Go through the moodle configuration. Good Luck.
In reply to Dennis Flynn

Re: Windows server: Installing Moodle using XAMP

by Sulaiman Hana Permana -
Hai Dennis,
which one do you suggest for production web server on windows 2003 server, IIS or apache ? Thanks
In reply to Sulaiman Hana Permana

Re: Windows server: Installing Moodle using XAMP

by Mike Smith -
Hi
I have recently installed Moodle 1.8 onto a server using XAMPP with IIS present. Initially we had some minor problems and, as it was late on a friday night decided to opt for Apache and removed IIS. Moodle was succesfully installed and is now being tested by colleagues. We have not yet set everything up for a full production server. So its early days yet. But Apache worked for us. Mike


In reply to Dennis Flynn

New Moodle server

by Doris Johnson -
I will be creating a new moodle server soon. I am presently using Windows 2003 server, IIS6, PHP5.2.1/ISAPI, MYSQL 5.0.5 and Moodle 1.8.5. We would like to upgrade using the same operating system but to the most stable version of Moodle, plus the most stable combination of PHP, MYSQL, and APACHE (not my choice). Do you have any suggestions. I know the right combination of versions are very important. Thanks for your help.
In reply to Doris Johnson

Re: New Moodle server

by Sasikala P A -
Picture of Translators
I would recommend the following:
apache-2.2
PHP-5.2.6
Moodle-1.9.3

I would recommend a stable GNU/Linux(CentOS or Ubuntu), because it's free of headaches when compared with Windows server.

Sasikala.
In reply to Mike Smith

Re: Windows server: Installing Moodle using XAMP

by Matt Gibson -
I've been using XAMP for production and it functions fine. The only issue is that I think its a little slow given the hardware I have and I'm looking to improve things by installing lighttpd and mysql from scratch. If there is a speed increase, I'll let you know.

I've also had anecdotal stories from my own users and other on these forums that XAMP doesn't scale very well when many people are logged on.
In reply to Mike Smith

Re: Windows server: Installing Moodle using XAMP

by Gary Anderson -
Mike:

We have used XAMPP for 2.5 years with version 1.6 and performance has been OK at a 550 student secondary school with pretty heavy use. Switching to version 1.9 is causing us to look at lighttpd, and I am looking forward to Matt's report on this. We may also consider other options with linux if that does not speed things up enough, although with the settings below, I am not sure if linux will be faster (with the same hardware), so we will find out.

One thing that is not OK with XAMPP are the SQL defaults. It is designed for a single developer and not classes of students.

If you install XAMPP from download.moodle.org, do the following:

Find mysql/bin/my.cnf and change the part around skip-locking to:
skip-locking
key_buffer = 150M
max_allowed_packet = 1M
table_cache = 200
sort_buffer_size = 2M
read_buffer_size = 1M
read_rnd_buffer_size = 512K
net_buffer_length = 2K
thread_stack = 64K
query_cache_size = 150M

Another thing, Apache might crash. You can fix this by going into the services control panel in windows and set apache to restart automatically, with a delay of 0.

Finally, if you have more than 30 or so users accessing Moodle at once, you will probably want some sort of php cache (we have used xcache). This will double your speed, in our experience.

The problem with the advice of installing all of the components by hand is that you have to become an expert on each of the settings. That will take a while. Do the above and you will have at least a workable system to start out with.

Good luck!

--Gary
In reply to Gary Anderson

Re: Windows server: Installing Moodle using XAMP

by Matt Gibson -
Wow,

Gary, you just fixed a lot of my performance hassles! The values in my.ini were ridiculously low. Now I have around 50% of the processor use I used to have.

Thank you smile

Matt
In reply to Matt Gibson

Re: Windows server: Installing Moodle using XAMP

by Gary Anderson -
Glad these worked, Matt. I just posted a bug report on this. I think it is a common cause of a slow Moodle. You may want to vote for it to be changed:

http://tracker.moodle.org/browse/MDL-12408

Also, I have started to play with Lighttpd and would love to share notes.

--Gary

In reply to Gary Anderson

Re: Windows server: Installing Moodle using XAMP

by Matt Gibson -
Sadly, my Lighttpd adventures didn't really get off the ground. Windows doesn't seem to support fastCGI and despite these recent instructions claiming it can be done (bottom of the page), I failed completely. I couldn't even get it going with normal CGI.

I'm going to give it another go on my windows XP box when I have time later in the week.

I've also voted on the bug you filed.
In reply to Mike Smith

Re: Windows server: Installing Moodle using XAMP

by Luis de Vasconcelos -

"XAMPP is built for tests or perhaps for a small company using it on an internal network. It is not meant for online access via the web on a production server."

http://docs.moodle.org/en/Windows_installation_using_XAMPP

In reply to Luis de Vasconcelos

Re: Windows server: Installing Moodle using XAMP

by Gary Anderson -
Luis:

I've read that line number of times on XAMPP over the past 3 yearssmile The problem is, most of us did not start as experts, but we developed skills over time. Yes, ideally Moodle should be installed on a specialized dedicated server with each component hand installed and tuned for the environment. More hardware and scalable components should be added and tuned as the user base expands.

But it is also true (from my experience) that one can operate a pretty stable and secure Moodle installation with hundreds of students with only basic server administration skills (provided one is willing to learn and grow) using the XAMPP distribution with the SQL settings adjusted as below.

And we will move over to a better system and do it right soon now--(it would me much easier if it were not for all those pesky students demanding our time). smile

Take care,

--Gary


In reply to Luis de Vasconcelos

Re: Windows server: Installing Moodle using XAMP

by Shin Okada -
Can you tell me where I can learn how to set up a Moodle server properly? I am willing to learn it.
Thanks.
In reply to Mike Smith

Re: Windows server: Installing Moodle using XAMP

by Ken Bosak -

I installed the XAMP package on a W2K3 server and the setup went almost without effort.  Nice.

But I'm having trouble getting moodle to start on it's own.  To bring up the site, I have to click on both the apache_start.bat and the mysql_start.bat files.

The Installing AMP docs state that you can automate this by installing the Xamp service (which I did). 

Yet, it still doesn't come up on it's own.  Each time I need to manually start SQL and Apache.

I've verified that the Xamp service is running, so what gives?  How do you guys automate moodle to start?

In reply to Ken Bosak

Re: Windows server: Installing Moodle using XAMP

by Matt Gibson -
I have added both apache and mysql as services using the batch files in the xampp directory. I had to make some changes to the services so they ran as the admin user and would autostart without anyone logging in, but it was trivial to do so. Trouble is I can't remember exactly what I did as someone else was helping me and did that bit.

Start with typing services.msc into the run dialogue on the windows start menu and you should see a big list of things that are installed. Find the xampp (or both apache and mysql) service and right click it for properties. It should be set to auto-start.