If you are going to run web workloads, you’d be remiss not to evaluate Windows Server 2008 and IIS7. In fact, Windows Server 2008 includes a Core installation option that is an excellent platform for a variety of computing workloads. One thing you might not have thought about is using open source software on our platform. Well think again.
In this screencast series, I’ll show you how to take advantage of Internet Information Server 7 as a premier platform for some popular products including PHP, MySQL and WordPress. Now you might be thinking I’ve gone off the deep end. No worries, I’m still sane (at this moment in time). If you are going to run those products, we’d rather have you run them on Windows than Linux or UNIX.
We don’t really go into hosting provisioning, management and performance but you’ll get an idea of how to setup and configure the products. The screencasts were recorded using Windows Server 2008 Core. I plan to record a similar screencast series in the next day or so on Windows Vista to give you an idea of how a developer workstation could be configured with open source software. I hope you enjoy both. It’s always funny to listen to yourself after the fact when I record these things. Sometimes I sound like such a Texas hick from the sticks. Oh well, it’s me. I’ll try and work on my grammar pardner.
For this screencast series I decided to go through a brief description of each section and then I provided links to all of the videos later in the post. I have also provided links to the non-streaming versions of the videos in case you want to download them and watch them offline.
Part 1 – Installing IIS 7 Roles and Features in Windows Server 2008 (video length = 7:42)
In this section we introduce you to Windows Server 2008 and the Core installation option. Installation of the IIS7 web server roles and features are demonstrated and discussed.
Start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-ApplicationDevelopment;IIS-CGI;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-Security;IIS-RequestFiltering;IIS-HttpCompressionStatic;IIS-WebServerManagementTools;WAS-WindowsActivationService;WAS-ProcessModel
Part 2 – Configuring PHP (video length = 7:34)
We need to configure IIS7 to use PHP as a CGI execution environment. All of the .cmd files in this section were created by me to ease the typing pain in the webcast. We’ll first configure FastCGI to use PHP with the demonstrated PHP1.cmd script.
appcmd set config /section:system.webServer/fastCGI /+[fullPath=’C:\php\php-cgi.exe’]
The next thing we need to do is setup the handler and module mapping for IIS7 so that it understands the available verbs and how to call PHP for request processing. This is demonstrated in the video by executing the PHP2.cmd file in the video.
appcmd set config /section:system.webServer/handlers /+[name=’PHP-FastCGI’,path=’*.php’,verb=’*’,modules=’FastCgiModule’,scriptProcessor=’C:\php\php-cgi.exe’,resourceType=’Either’]
And finally for the PHP configuration section, we setup IIS7 default document processing with PHP3 and PHP4.cmd
appcmd set config “Default web site” /section:defaultDocument /enabled:true
appcmd set config “Default Web Site” /section:defaultDocument /+files.[value=’index.php’]
You’ll notice in the commands above we are using the IIS7 appcmd.exe program to modify the settings and therefore the behavior of IIS7. In the screencast we also modify the INI file that contains the PHP configuration settings so that we can turn on the needed PHP extensions. Lastly for this section we open the MySQL firewall port ahead of the actual installation and configuration of that product.
Part 3 – Installing and Configuring MySQL (video length = 5:36)
WordPress needs a database for its operation and MySQL fits the bill nicely. In this screencast section, we install and configure MySQL by creating the wordpress database, granting permissions to the database, assigning passwords, etc.
Part 4 – Configuration of WordPress (video length – 5:37)
The last screencast is short and sweet as we create and modify the wp-config.php file which contains the userid, password and database configuration information. Then it’s time to test the WordPress interfaces from another virtual machine to see if everything above actually worked. In the webcast I delivered, I left off a single ; in the MySQL configuration so the databases weren’t created properly. A one character error can do that to you. Be careful and take your time.
Screencast Video Downloads – please right mouse click the links below and SAVE AS
Program Downloads and Links
Windows Server 2008 – http://www.microsoft.com/windowsserver2008/en/us/try-it.aspx
PHP – http://www.php.net
MySQL – http://www.mysql.com
WordPress – http://www.wordpress.org