Installing Moodle on Microsoft Windows Server 2012 R2 - Video Tutorial


With IIS (Internet Information Services) - Web Server bundled with Microsoft Server operating system getting improved overtime in terms of security, stability and scalability, still most of the Moodle installation are based on Linux and Apache for there had been tendency of Linux and Apache as being free web server combination than Microsoft Platform. But, Linux comes with a steep learning curve and people like myself who already are comfortable with Windows environment for I have spent considerable time on Windows Server during my M.Sc. dissertation at The University of Manchester, find it hard to learn from scratch a completely new operating system specially in case if you are managing or looking to manage your Moodle server yourself. This tutorial will assist you in setting up a Moodle server from scratch based on Microsoft Server 2012 R2 with IIS 8.5, I have as well discussed requirements particular to Moodle installation on Microsoft Windows Server environment.

Server Hardware

This question of what hardware I need can never be answered or preciously with everyone coming with different needs this can never be brought to one single point where one can comfortably say well O.K. this is the best combination of hardware requirements for a performing Moodle server. Just getting a powerful CPU and loads of RAM will not meet your requirements as then hard drive throughput will become bottleneck, so try finding a sweet spot of a performing server.

As per Moodle's documentation, ideally keeping server operating system and swap file (page file in case of Windows server) on one drive, whilst keeping rest of the components (Application server (PHP), Moodle and database) on second drive.

Now in terms of LAMP (Linux, Apache, MySQL and PHP) installation, where web server (Apache) does not comes as a part of operating system, it can be installed on any drive other than the one holding operating system but there is limitation with Microsoft Windows server where when installed, IIS is always installed in the default directory where operating system is residing. I have tried reading through IIS forums if it can be installed in different directory other than O/S directory and did manage to find answers to that where making changes in registry file lets IIS to be installed in any drive, but then after reading somewhere a comment from IIS developer that as IIS being part of operating system has to interact with DLL (Dynamic Link Libraries) of operating system, so it is always better to keep this installed in its default location, this makes more sense for me to keep on finding ways to install IIS in other directory.

This being said, again referring to Moodle performance documentation, adding on top I would recommend to add another drive and keeping database on that independent drive, ideally an SSD (Solid State Drive) for the IOPS of SSD is far superior to traditional mechanical drive and in terms of Moodle's installation the database read-write activity is tremendous. Therefore your drive structure ideally should be as follows:

Ideal Drive Structure

  • [vtab]
    • ##database## 1st Drive (System Drive)
      • Holding O/S and Page/Swap File (Ideally SSD Drive)
    • ##database## 2nd Drive (Data Drive)
      • Holding Application server (PHP) and Moodle + Moodle Data files (depending on size of your Moodle files, you can go with Mechanical or SSD, where SSD's performance will be far superior considering application will be running from this drive and moodle  stores cache in moodledata)
    • ##database## 3rd Drive (Database Drive)
      • Database Drive - Best would be if SSD Drive is used for the IOPS of SSD Drive is far superior to traditional mechanical drives. Additionally, moodle temp directory should as well be moved to SSD drive from moodledata folder. 

This above is recommended for one box solution, if you can do make use of RAID or if spending is not an issue, then keep database on a separate box for scalability.
If you are looking for a hosted solution, rather setting up in house server, then do consider Contabo hosting, for their prices are unbeatable and drives can be fully customizable.

Downloads

Web server already comes as a part of Server operating system, additional downloads required are mentioned below with links to their respective sites.

  1. Moodle (Watch video for explanation of which package to download)
  2. PHP (Including Visual C++, version depends on PHP version selected)
  3. Database (I am using MariaDB, you can choose DB of your choice)
  4. PHP Manager (Not required, but highly recommended) 
  • [message]
    • ##info-circle## PHP Manager Update for Server 2012 & Server 2016
      • With regards to PHP Manager extension, a kind developer has updated versions for IIS 8/8.5 (PHP Manager 1.3 64-bit) and as well for IIS 10 (PHP Manager 1.4 64-bit), you can download  these using links provided, not much has been added to these extensions, but I believe only versions  numbers have been updated, for even the initial version 1.2 is working fine on IIS 10.
[post_ads]

PHP Settings

As PHP version 7.0 recently came out, and as per their promise of nearly twice the performance as compared to previous version of PHP, their claim does hold for Moodle as well, for I have tested PHP 7 on its very first Alpha release and it did showed twice the performance in terms of less than half rendering time while using lower memory (even 1/10 in some cases), several other community members have tested PHP 7 on dedicated machines using proper testing procedures and they have as well confirmed 50% or above gains, therefore I cannot recommend enough using PHP 7 if you can. Moodle 3.0.1 and on wards came with support from Moodle developers as well for they have tested this version with PHP 7.

Either you can watch video and follow step by step in initialization of PHP, else to save time, copy and paste these few lines in the end of your php.ini file editing and deleting as required.

[error_log="C:\php\php56\temp\"
upload_tmp_dir="C:\php\php56\temp\"
session.save_path="C:\php\php56\temp\"
cgi.force_redirect=0
cgi.fix_pathinfo=1
fastcgi.impersonate=1
fastcgi.logging=0
max_execution_time=300
max_input_vars =2000 */only applies if using PhpMyAdmin to manage databases/*
date.timezone=Europe/London
extension_dir= "C:\php\php56\ext\"]

Rest for enabling required and optional extensions, I have explained in Video, you can watch to learn more, I have as well discussed setting up and configuring OpCache extension, that will further enhance the memory usage and page render timing for your Moodle pages.

Database

Thankfully with windows platform, user have plenty of database options like Microsoft's own SQL Server comes with a free edition as well, ever popular MySQL, industry's known PostgreSQL and also a fairly new addition of MariaDB that comes as a drop-in replacement of MySQL and is as well recommended by Moodle developers for the tests they have done comparing it to MySQL, MariaDB has shown improved results.
I have not personally tested Microsoft SQL Server, and have no doubts about its performance, but then using either of MySQL and MariaDB would give me added advantage of liberty towards either moving from or to a Linux based platform, as then only thing I have to do is, transfer folders and I am good to go without changing the database.
Out of MySQL and MariaDB, I have showed installation on MariaDB for one reason I have mentioned above already, secondly during installation MariaDB did gave me option of choosing installation path whilst latest version of MySQL didn't and finally I have seen during my tests MySQL taking some 400+ MB of memory while MariaDB was performing the similar tasks on 108 MB or less. Please as well consider appropriate allocation of buffer to database, for MariaDB's default is 12.5% of total system RAM, so adjust accordingly as if you can allocate higher, do it, else if you are running DB separately, then allocate some 70-80% of total system memory.

Do watch video for explanation of downloads where applicable. This below video will take you step by step in manually setting up your server, whilst second video will show setting up PHP using PHP Manager (an extension to IIS) making your job of setting up and managing PHP much easier.


Moodle Installation Videos


  • [accordion]
    • ##youtube-play## Video 1: Moodle Server Set-up using MANUAL method
      • This videos shows setting up Moodle on IIS using manual way of setting up PHP
    • ##youtube-play## Video 2: Moodle Server setup using PHP Manager (Recommended Method)
      • This Video will show how to setup Moodle using PHP manager, which is a recommended method for keeping everything clean and managed, however I will still recommend going through above video as I have spent considerable time in that video in explanations.


COMMENTS

Name

Database,1,Hosting,2,Moodle,6,security,1,Shared Hosting,2,
ltr
item
AcademicTools(Blog): Installing Moodle on Microsoft Windows Server 2012 R2 - Video Tutorial
Installing Moodle on Microsoft Windows Server 2012 R2 - Video Tutorial
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-ohUWODUiqRkqoAl3MyVmwPKCffWB55HyJ9gjgtIOVo_QpEnqLwmKUXCwSiVbNMXbyYoaCP3M_ASTqhULTvDhkRwD8RZUf7GrbVw63wuDVU4XoADsZn4Uaa9yrEEMYoCIouLh6Uf93QQS/s320/moodle-iis.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-ohUWODUiqRkqoAl3MyVmwPKCffWB55HyJ9gjgtIOVo_QpEnqLwmKUXCwSiVbNMXbyYoaCP3M_ASTqhULTvDhkRwD8RZUf7GrbVw63wuDVU4XoADsZn4Uaa9yrEEMYoCIouLh6Uf93QQS/s72-c/moodle-iis.png
AcademicTools(Blog)
https://blog.academictools.org/2015/12/installing-moodle-on-microsoft-windows.html
https://blog.academictools.org/
https://blog.academictools.org/
https://blog.academictools.org/2015/12/installing-moodle-on-microsoft-windows.html
true
3358835764133152411
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content