The Odd OS Out
In the world of the wiki, being in the Windowscamp sometimes makes you feel like a second-class citizen.
Much of the information for wikis on the Windowsplatform is either out of date, or just plain wrong. Manyof the tools encourage users to simply accept Linux into theirlives, giving vague warnings about the dire consequences that awaitif they dare to host the product on Windows.
While Linux is undoubtedly the optimal solution in somecases — such as when you can requisition or reconfigureexisting hardware to act as a new Linux server, or whenyou’re using some of the superlative virtual machinesolutions — many shops lack UNIX/Linux skills, or they simplywant a homogenous platform, and thus would prefer to stick to theWindows platform even if it wasn’t the native-environmentoriginally envisioned.
Sometimes the team is skillful and adept with Linux, but thecorporate IT department brutally seeks out and destroys rogue PCsrunning the unauthorized OS, storming the department in a flurry offlying pocket protectors.
All is not lost, however.
Wikis To The Rescue
Not only are there numerous wiki or wiki-likeproducts (yafla provides Sharepointconsulting in addition to wiki solutions, however Sharepointfulfills a subtly different niche than wikis)available for the Windows platform, you can even host thetrendsetter in the wiki world – MediaWiki – onWindows.
MediaWiki, as you likely know, is the rapidly evolvingsoftware platform on which Wikipedia is based. It’s freeto download and use, even for big, soul-less corporations.
So without further ado, the following is a no-nonsense guide togetting MediaWiki installed on Windows XP, Windows 2000, or Windows2003. This is intended to get you up and running, and if you findthat you like the platform and the package then you can startlooking into advanced customization and locking down (for instanceyou canconfigure a Wiki to only allow authorized users to make changes,with authorized users only being created by users with appropriateprivileges. This eliminates the primary fear of mostwiki-holdouts — a fear that a wiki is a crazy free for all).
My primary goal is simply to get people looking at wikis, seeinghow simple it is to configure them. In Optimal Software Development Processes and Practices, I wroteabout the need for formulating written standards. The reason many teams shirk fromsuch a task is because it’s one that appears to have a lot ofupfront, contentious work involved, generating the first version ofthe definitive Corporate Standards guide. Using a wiki, though, andyou can organically grow team information like standards, addingsmall additional pieces of information as they come up, withextraordinarily easy editing, organized centralization (which Icovered in Organize Your Information), and full history and revisioncontrol.
A wiki can be a tremendous information tool for modernteams. It works in the way that information is often accumulated,and not in the spastic, all-or-nothing manner usuallypursued.
- Download and install the feature-rich 7-zip. This will facilitateunzipping/untarring files further in the process. Log out and backin to enable the GUI extensions.
- Download and install the GNU diffutilities. You can get by with the “complete package, exceptsources”. Note where you installed it, as you’ll require thelocation in a later step (this will likely be C:\\ProgramFiles\\GnuWin32).
Option 1 – The WAMP Platform
You’ve probably heard the acronym LAMP (Linux +Apache + MySQL + PHP/Perl/Python). It’s the description of animportant and somewhat standard technology stack on which atremendous number of very successful solutions are built. It’sextraordinarily feature rich and capable, not to mention that itcomes at a very good price.
AMP is all of the stack on a platform otherthan Linux, WAMP being Windows + Apache+ MySQL + PHP/Perl/Python.
One of the easiest and most-up-to-date options to configure WAMPon Windows is the DeveloperSide.NETWeb-Server Suite. Offering a free, pre-packaged configurationof the fundamentals, this option can get you up and runningin little time, even on the “non-server” Windows XP.
- Download and install the self-installing DeveloperSide.NETWeb-Server Suite at http://www.devside.net/web/server/free/download.Note the install location (by default C:\\www). Restartwhen prompted.
- If you already have the IIS World Wide Web Publishing running,there will be a conflict over port 80. You can move your wiki to adifferent port by modifyingC:\\www\\Apache2\\conf\\httpd.conf. You can then runC:\\www\\Apache2\\bin\\ApacheMonitor.exe to stop andrestart the service. If you opt to do this you’ll have to appendthe port when you access your wiki (e.g. http://localhost:85 if you choseport 85) in later steps, and this could cause problems for machineswith software or hardware firewalls between them and the wiki,which usually only expect HTTP traffic on port 80.
- Delete index.html from C:\\www\\webroot(altering the path if you have a different install location fromstep 1).
- DownloadMediaWiki. For this setup I grabbed 1.5.6, which is astable release from January 19th, 2006. When you read thissomething newer may be available.
- Right click on the downloaded file(mediawiki-x.x.x.tar.gz, where the x’s represent theversion number – e.g. mediawiki-1.5.6.tar.gz) and pick”7-Zip -> Extract Here“.
- Right click on the newly ungzipped file,mediawiki-x.x.x.tar (where of course the x’s refer to theversion number. e.g. mediawiki-1.5.6.tar), and choose”7-Zip -> Extract Here“.
- Copy the contents of the newly extracted folder – e.g.mediawiki-1.5.6, to C:\\www\\webroot, altering ifyou have a different base directory in step 1. For instancenavigate into the folder, choose Edit/Select All, Edit/Cut,navigate to C:\\www\\webroot and choose Edit/Paste). You should now have files such as wiki.phtml in the folderC:\\www\\webroot.
- Open a web browser pointing to http://localhost/ (or the IP or DNSname of whatever server you’ve installed this on), and you shouldbe presented with a page telling you to setup the wikifirst.
- Everything should be fairly self-evident. After settingpasswords for the sysop (which is the account used to administerthrough the wiki web app), as well as for the new MySQL account, besure to clear the password at the very bottom, as by default MySQLwas installed with no password on the root account, albeit limitedto local access.
- Copy LocalSettings.php fromC:\\www\\webroot\\config\\ toC:\\www\\webroot\\.
- Configure the email server appropriately – if you’re runningthe IIS SMTP server locally you’re good, otherwise you need tomakea configuration change so the wiki is capable of sendingemail.
- Access your wiki! Start editing and creating pages (search fora new topic, and then click on this exact title in theresulting search failure page — you’re now editing the new page!),organically growing your information base! Select Edit oncomplex Wikipedia entriesto see how features like categorization, sections, sidebars, andimages are achieved.
- Read the User’sGuide to see how to customize things like images, templates,allowing uploads and images, and so on, and how to editpages. Login as WikiSysop (or whatever else you named it) andplay around with preferences, special pages, skins, and so on.Create accounts for members on your team.
- If you find that you like the platform, remember to make abackupstrategy for your MySQL wiki database.
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’sfast, capable, and you probably have other applications running onit (e.g. .NET apps), and perhaps you don’t want the heft of asecond set of webserver services running on your machine simply tohost a new web app.
Well you don’t need to run Apache for MediaWiki if you don’twant to.
This configuration is a little bit more involved as I’ve chosento recommend the individual constituents, but in the end you’llhave what could be considered a more granular, controlledconfiguration 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/RemoveWindows Components.
- Download andinstall MySQL (in this case I downloaded and installed the 34.9MBv5.0.18 “Windows (x86)” variant), using the “Typical” installoptions. 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 needthis later, as by default this stand-alone install is more securethan the packaged bundles).
- Download the”PHP 5.x.x zip package” (not the installer), for instancePHP 5.1.2zip package.
- Right click on the downloaded file and pick7-Zip->Extract Files. Enter C:\\PHP as thepath.
- Copy libmySQL.dll from C:\\programfiles\\mysql\\MySQL Server 5.0\\bin to C:\\PHP.
- In C:\\PHP, rename php.ini-recommended tophp.ini.
- Open php.ini in notepad.
- Find the line (Edit/Find) extension_dir = “./” andchange it to extension_dir = “C:\PHP\ext”
- Find the line ;extension=php_gd2.dll and remove theleading semicolon, leaving extension=php_gd2.dll
- Find the line ;extension=php_mysql.dll and remove theleading semicolon, leaving extension=php_mysql.dll
- Save the file and exit notepad.
- Add C:\\PHP to the path (Start/ControlPanel/System/Advanced/Environment Variables. Under SystemVariables, double click Path and append ;C:\\PHP on theend (note the semicolon).
- Add a new system environment variable (Start/ControlPanel/System/Advanced/Environment Variables) called PHPRC,with the value C:\\php
- If you’re running Windows 2003, run Start/AdministrativeTools/Internet Information Services (IIS) Manager. Expand the localcomputer, and choose “Web Service Extensions”. Select “Add a newWeb service extension”. Give it the name PHP, and then Add the required file C:\\PHP\\php5isapi.dll. Set thecheckbox “Set Extension status to allowed”. This will allow theextension to run.
- In IIS Manager, expand websites and right click on DefaultWeb Site. Choose the Home Directory tab, and select theConfiguration 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.
- In IIS Manager, expand websites and right click on DefaultWeb Site. In the Documents tab select Add andconfigure the new default content page to index.php. Okout, and choose Move Up until index.php is at the top of thelist.
- Complete steps 4 to 12 from the WAMP configuration, replacingall references to C:\\www\\webroot withC:\\Inetpub\\wwwroot. Also be sure to enter the root MySQLpassword that you set in step 1 into the Wiki setup page. As onelast hiccup, you will likely have to provide the accountIUSR_LOCALMACHINE, where local machine is the hostname ofthe machine in question (e.g. IUSR_MyServerA1) with fullcontrol of the C:\\inetpub\\wwwroot\\config directoryduring Wiki setup, allowing it to emit the generated setup file.You can remove it right after generating and copying theLocalSettings.php file. Alternately you can customize theaccount under which the web site is running.
- If you wish to enable uploads, you will also have to configuredirectory access on C:\\inetpub\\wwwroot\\images, allowingthe account under which the web application is running to haveaccess to modify files in that directory. For instance addIUSR_LOCALMACHINE (again where localmachine is thehostname of the machine in question, such asIUSR_MyServerA1), or whatever other account you have theapplication pool running under, to have full control of thedirectory, or simply give it Add File permission and add fullcontrol to the CREATOR OWNER virtual account.
Voila, a high performance wiki hosted with IIS on Windows. Nowif only there were a ASP.NET 2.0 fork with all of superlativeMediaWiki functionality and usability, coupled with a SQL Serverback-end…
Once you have the platform configured to demonstrate the conceptto yourself and your team, you can begin altering the look andfeel, and enabling huge performance speed-ups such as the PHPcompiled caching extensions and memory caches. This is just apowerful starting point.