This guide is designed more as a checklist of things to remember to do when deploying a Windows Web Server including PHP and MySQL as a WAMP server. WAMP stands for Windows, Apache, MySQL and PHP. In our case we will be using IIS instead of Apache, so I suppose we should call it a WIMP stack, hmmm!!!
Stage 1: Install your Windows Web Server
- Install Windows Server (of course!)
Next we need to do some preparation work…
- Install all available windows updates
- TEMPORARILY disable IE ESC, or install Chrome
Now let’s do MySQL first, why not?
- Visit http://dev.mysql.com/downloads/windows/installer/ and download the MySQL windows installer
- Install MySQL and select: Server only, Data Path (d:\mysqldata or wherever you want to store your data)
- Configure MySQL as part of the installer: Config Type: Server Machine, Port 3306, Show advanced options: set root password
Time to get started on IIS…
- Download Visual C++ Redistributable for Visual Studio 2012 from http://www.microsoft.com/en-gb/download/details.aspx?id=30679 – x86 version
- Install IIS Role with defaults from Server Manager
- Copy the IIS shortcut to the desktop (I do this for any role I install on a server so I quickly know what roles it has!
- Install Microsoft Web Platform when prompted, if not prompted you can download it here: http://www.microsoft.com/web/downloads/platform.aspx
- Search for PHP and select the version you wish to install and click Add -> Install
- Also search for IIS: Dynamic Content Compression and install that too.
Now let’s configure PHP a little…
- Create a folder in c:\inetpub\temp called PHP
- Edit the security settings of c:\inetpub\temp\php and grant USERS full control
- Launch or Restart IIS
- Select Server Name and then double click PHP Manager
- Fix warnings at the top of the manager
- Click ‘Manage all Settings’
- change the session.save_path to c:\inetpub\temp\php
- change the upload_tmp_dir to c:\inetpub\temp\php
- change the error_log to c:\inetpub\temp\php\PHP55_errors.log
Got this far? Great, let’s test it…
- Create a file in c:\inetpub\wwwroot called phpinfo.php and add just the following line:
<?php phpinfo(); ?>
- browse to your webserver at http://webserver-ip/phpinfo.php
- Success? Of course! Well done!
- Re-enable IE ESC
- Run all Windows Updates until none remaining
- Set windows update to Download but don’t install
- Follow Part 2 of this guide which is all about securing your Windows Web Server including PHP and MySQL
That’s it! In under 15 minutes you should have a working Windows Web Server including PHP and MySQL.