Learn how to install Moodle on Microsoft Windows. Follow step-by-step instructions for a smooth installation process on your Windows PC.
[post_ads]
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 adding 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:
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.
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.
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.
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 adding 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.- Moodle (Watch video for explanation of which package to download)
- PHP (Including Visual C++, version depends on PHP version selected)
- Database (I am using MariaDB, you can choose DB of your choice)
- 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.
[post_ads_2]
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.
- [message]
- ##info-circle## Further recommend links in setting up Moodle on Windows server with IIS
COMMENTS