IIS and MediaWiki – another solution gonna be

Option 2- The WIMP Platform

IIS 5.1, and moreso IIS 6.0, really is a superlative web server, and in security metrics it’s actually been beating out Apache. It’s fast, capable, and you probably have other applications running on it (e.g. .NET apps), and perhaps you don’t want the heft of a second set of webserver services running on your machine simply to host a new web app.

Well you don’t need to run Apache for MediaWiki if you don’t want to.

This configuration is a little bit more involved as I’ve chosen to recommend the individual constituents, but in the end you’ll have what could be considered a more granular, controlled configuration than using one of the all-in-one stack solutions.

This presumes that you’ve already installed IIS. If you haven’t, used Add or Remove Programs and add IIS in Add/Remove Windows Components.

  1. Download and install MySQL (in this case I downloaded and installed the 34.9MB v5.0.18 "Windows (x86)" variant), using the "Typical" install options. In the detailed configuration choose appropriate settings (for instance Developer Machine if you’re just doing a trial run), noting the new root password for the database server (you’ll need this later, as by default this stand-alone install is more secure than the packaged bundles).
  2. Download the "PHP 5.x.x zip package" (not the installer), for instance PHP 5.1.2 zip package.
  3. Right click on the downloaded file and pick 7-Zip->Extract Files. Enter C:\PHP as the path.
  4. Copy libmySQL.dll from C:\program files\mysql\MySQL Server 5.0\bin to C:\PHP.
  5. In C:\PHP, rename php.ini-recommended to php.ini.
  6. Open php.ini in notepad.
  7. Find the line (Edit/Find) extension_dir = "./" and change it to extension_dir = "C:\PHP\ext"
  8. Find the line ;extension=php_gd2.dll and remove the leading semicolon, leaving extension=php_gd2.dll
  9. Find the line ;extension=php_mysql.dll and remove the leading semicolon, leaving extension=php_mysql.dll
  10. Save the file and exit notepad.
  11. Add C:\PHP to the path (Start/Control Panel/System/Advanced/Environment Variables. Under System Variables, double click Path and append ;C:\PHP on the end (note the semicolon).
  12. Add a new system environment variable (Start/Control Panel/System/Advanced/Environment Variables) called PHPRC, with the value C:\php
  13. If you’re running Windows 2003, run Start/Administrative Tools/Internet Information Services (IIS) Manager. Expand the local computer, and choose "Web Service Extensions". Select "Add a new Web service extension". Give it the name PHP, and then Add  the required file C:\PHP\php5isapi.dll. Set the checkbox "Set Extension status to allowed". This will allow the extension to run.
  14. In IIS Manager, expand websites and right click on Default Web Site. Choose the Home Directory tab, and select the Configuration button in the Application settings section. Click on the Add button in the Mappings page. For the executable, enter C:\PHP\php5isapi.dll, and for the extension enter .php. Ok all of the dialogs.
  15. In IIS Manager, expand websites and right click on Default Web Site. In the Documents tab select Add and configure the new default content page to index.php. Ok out, and choose Move Up until index.php is at the top of the list.
  16. Complete steps 4 to 12 from the WAMP configuration, replacing all references to C:\www\webroot with C:\Inetpub\wwwroot. Also be sure to enter the root MySQL password that you set in step 1 into the Wiki setup page. As one last hiccup, you will likely have to provide the account IUSR_LOCALMACHINE, where local machine is the hostname of the machine in question (e.g. IUSR_MyServerA1) with full control of the C:\inetpub\wwwroot\config directory during Wiki setup, allowing it to emit the generated setup file. You can remove it right after generating and copying the LocalSettings.php file. Alternately you can customize the account under which the web site is running.
  17. If you wish to enable uploads, you will also have to configure directory access on C:\inetpub\wwwroot\images, allowing the account under which the web application is running to have access to modify files in that directory. For instance add IUSR_LOCALMACHINE (again where localmachine is the hostname of the machine in question, such as IUSR_MyServerA1), or whatever other account you have the application pool running under, to have full control of the directory, or simply give it Add File permission and add full control to the CREATOR OWNER virtual account.

Voila, a high performance wiki hosted with IIS on Windows. Now if only there were a ASP.NET 2.0 fork with all of superlative MediaWiki functionality and usability, coupled with a SQL Server back-end…

Once you have the platform configured to demonstrate the concept to yourself and your team, you can begin altering the look and feel, and enabling huge performance speed-ups such as the PHP compiled caching extensions and memory caches. This is just a powerful starting point.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: