SMWCon Fall 2013/Hands-on session. Programming MediaWiki extension/Mac setup

Below there are some steps and recommendations for installing MediaWiki in your Mac OS X.

It's not strictly mandatory, but it will be helpful if you get a bit familiarised with Mac OS X Terminal.

Apache and PHP
 Afterwards, type down in your browser location bar:. If you get some detailed information about your system and PHP installation, this means that everything works OK. Note: Don't keep this kind of files in a production server.
 * Apache (the webserver) and PHP (the main programming language used by MediaWiki) are already installed by default (checked in Mac OS X 10.6.8 - it should work in later versions)
 * Open.
 * Uncomment / Remove '#' from line LoadModule php5_module
 * If using the terminal, you may need to prepend  to the commands, e.g..
 * Restart Apache:
 * If you don't want to have different virtualhosts (that is working with only one domain), your documents are placed at: . Otherwise, you can define them. Keep in mind therefore that you need to add 'fake domains' in.
 * In order to know whether PHP and Apache are working ok, we can create a file named  in   with the following content:

Tips

 * Apache operations:  -> it restarts Apache. Other commands: start, stop, graceful, etc.
 * To have Apache started automatically by default: . More details:
 * Apache Short-URL configuration for MediaWiki

MariaDB

 * Install homebrew - Package manager that can help you turn your Mac OS X in a powerful programming environment.
 * Note: Binaries installed by brew can be found in
 * Install MariaDB (MySQL-compatible DB engine). Using brew via terminal.

MediaWiki

 * Download the latest version of MediaWiki
 * Unpack it into your webserver directory. For default setups, this is likely to be /Library/WebServer/Documents
 * Following MediaWiki convention, rename created directory (e.g. from  to  )
 * Open in browser:  and follow installation instructions.
 * At the end of the process, you will be prompted to place a  (main MediaWiki configuration file) under
 * You will end up with a wiki under . Despite it's not very orthodox, and more elegant way could be via virtualhosts, you can always install other wikis in other subdirectories. Such as:   or.

Other software
Depending on what you want to do with your wiki, you may need to use other software. An example is imagemagick, for generating thumbnails.


 * Install:

in LocalSettings.php you add:

$wgUseImageMagick = true; $wgImageMagickConvertCommand = '/usr/local/bin/convert';

More links

 * MediaWiki hosted Instructions on how to install Apache+php+mysql.
 * gedit - a free, multiplatform and open-source programming editor. We will use this during the session, but you are free to use your favourite one (installation and usage instructions).
 * iTerm2 - more powerful terminal than default one.