Trying to follow Buckminster Fuller's example in life, one step at a time to bring you brain scrapings for a new millennium.

Setting Up MediaWiki on an Apple Mac

05 Jan 2013 - Nic Ho Chee

After one too many issues with a Hackintosh and a short but painful trip to an Apple store my MediaWiki Windows installation needed moving across into the unknown realms of OSX. After some surprising turns the install worked and the steps have been captured for posterity.

What Do I Need To Try This Out

The post is split into two sections, the first covers a basic MediaWiki installation and the second covers setting up MediaWiki Math support. For a basic installation:

  1. MediaWiki. I'm using 1.20.0 which can be picked up here
  2. XCode and the Command Line Tools for XCode. DL XCode from the Apple App Store, you'll need to pick up the Command Line Tools for XCode from here;
  3. Libltdl. You can pick this up from here;
  4. Imagemagick. Use 6.7.2, which you can pick up from here; I don't want to use MacPorts, so I couldn't use the built version on
  5. Mamp. The installation works with 2.1.1 which can be picked up from here;
For MediaWiki Math support:
  1. MediaWiki Math Extension. Download the 1.19 version;
  2. Ocaml. Download the 4.01 version;
  3. LaTex. Download the 2.1G version;
  4. Ghostscript. Download the 9.06 version;

How To… Install The Basic Verson

…And that should be about it. You should now be able to create pages like this:

How To… Install the MediaWiki Math Extension

This is really handy if you're looking to embed math notation like this... ...into your wiki posts.

Unfortunately here is where you may start to have problems. MAMP changes the DYLD_LIBRARY_PATH to use the Macport version for some of the paths and you should be using the Apache libs which are built with OSX. If you look in the console you will probably have a set of dvipng and convert with Symbol not found: _cg_jpeg_resync_to_restart etc errors. If you're interested in tracking down the errors yourself, you can turn on the debugging and logging by adding the following to the top of your LocalSettings.php file and clearing the wiki cache:
error_reporting( -1 );
ini_set( 'display_errors', 1 );
$wgShowDebug = true;
$wgDebugToolbar = true;
$wgDebugLogFile = "$IP/debug.log";

Purge the wiki cache and you should be able to add Math notation to your hearts content and create pages like this:

Enjoy :).