There are some decent, but incomplete hints hints on how to start a MediaWiki farm, including a template for setting up a Drupal-style farm. I used this template.
The basic idea is:
- Set up a good directory structure with the appropriate mappings of sites to directories.
- Install an instance of MediaWiki. This creates your initial database and a site-specific LocalSettings.php.
- Move the LocalSettings.php to the appropriate site directory.
- Use a Drupal-style LocalSettings.php in the main directory. This will find the appropriate config for each site, and it also allows you to configure some default settings for all sites.
The directory structure I'm using is:
/var/www/mediawiki/ /var/www/mediawiki/mediawiki-1.14.0 /var/www/mediawiki/code /var/www/mediawiki/sites /var/www/mediawiki/sites/kitchen.blueoxen.com.coaches.wiki /var/www/mediawiki/sites/kitchen.blueoxen.com.coaches.w ...
code is a symbolic link to the code. The sites subdirectories follow the Drupal convention for expressing domains and paths. Note that you need both a *.wiki and a *.w directory in order to enable Short URLs. I make one a symlink to the other.
Actually getting the Wikis installed is tricky and requires a bit of bootstrapping. I first pointed a domain at /var/www/mediawiki/code and ran through MediaWiki's default installation process. This gave me a LocalSettings.php file that I could customize per site and it populated the MySQL database, w_blueoxen. I then edited and moved LocalSettings.php to the appropriate sites directory and installed the Drupal-style configuration file. Things to change:
$IP = "/var/www/mediawiki/code"; $wgScriptPath = "/path/URL";
In order to install other Wikis, I disable the main LocalSettings.php, access the desired URL, run through installation/configuration again, then modify the files accordingly. The only thing this really buys me is populating the database, as I could easily install a custom LocalSettings.php file without going through the default setup.
Group Access Control
If you want to setup a private Wiki that only a certain set of people can edit, define a new group (e.g. newgroup):
$wgGroupPermissions['*']['read'] = false; #$wgGroupPermissions['user']['read'] = false; $wgWhitelistRead = array ("Special:Userlogin", "MediaWiki:Common.css", "MediaWi$ # Disable anonymous editing $wgGroupPermissions['*']['edit'] = false; # Prevent new user registrations except by sysops $wgGroupPermissions['*']['createaccount'] = false; $wgGroupPermissions['newgroup']['read'] = true; $wgGroupPermissions['newgroup']['edit'] = true;
Note that $wgGroupPermissions['user']['read'] is commented out. This is so that you can log in and access Special:Userrights. Once you have added yourself to newgroup, you can uncomment it.
My farm uses a shared user table by setting $wgSharedDB to "w_blueoxen" and $wgSharedPrefix to "blueoxen_" in the main LocalSettings.php. What this does is force all installations to use the users table for the blueoxen (collaboratories) Wiki installation.
- Pretty URLs
- Disabled discussion tab. Only applies to Monobook skin. The technique listed here requires changes to each Wiki, because the change is saved in the database. I can circumvent this by either creating a default database template for all Wikis or by editing the default skin rather than overriding it.
- Disabled display of IP address in header
- Open Proxy test on editing
- Installed Widgets extension
- Installed and configured InterWiki extension. Doesn't seem to support InterWiki links to namespaced pages.
- Installed Select Category Tag Cloud extension. The tag cloud may be overkill. May install CategorySuggest instead, which is derived from this extension and is much simpler. Would like to have tag cloud displayed when viewing the page, not just when editing. Also, doesn't seem to support selection of multiple categories, which is bad.
- Category entry looks too much like Summary entry. I've confused the two a number of times.
- Installed PMWX. Works well!
- Configured to support upload of other file types (such as PDF). The downside? MediaWiki assumes that all uploaded media are images, and reserves special capabilities based on these assumptions. It works for non-images, but it's a hack.
- Configured and installed SpamBlacklist
- Configured and installed reCAPTCHA
- Installed EmbedVideo.
- SemanticMediaWiki and associated plugins
- Configured and installed Cite for Wikipedia-style citations
- Installed and configured Google Analytics Integration for some of the Wikis.
- FCKeditor from svn: http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/FCKeditor
- Installed OpenID extension. I'm having some weird trouble with the OpenID extension. If I login with my XRI, it fails the first time, but succeeds the second. Also, I can't seem to access my user page.
- Disable anonymous editing?
- Installed clean skin, then removed it. Need a better understanding of how MediaWiki Skins work. Would be good to remove $wgDefaultSkin entry from the site-specific LocalSettings.php.
- Create a usable skin.
- Install fckeditor. Wait for Wikia version to come out; it's much better.
- Use MediaWiki's access control capabilities to protect private Wikis (rather than .htdigest).
- JSBreadCrumbs extension
- Countdown extension
- ConfirmAccount extension