Wiki installation on Mac OS X

From AardRock Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

To install MediaWiki, simply follow the instructions from MediaWiki Installation for:

  • Mac OS X 10.4.8;
  • PHP 5.0.2-3;
  • MySQL 5.0.27;
  • MediaWiki 1.8.2.

To install Apache

Apache is standard installed on Mac OS X (10.0.4 has Apache 1.3.33 installed).

To install PHP

  1. Download PHP from Marc Liyanage and:
  2. Install according to instructions;
    • Installs in /usr/local/php5;
    • Creates appropriate symbolic link:
      • /etc/httpd/users/+entropy-php.conf -> /usr/local/php5/entropy-php.conf.

To install MySQL

  1. Download MySQL from official MySQL site;
  2. Follow instructions on Installing MySQL on Mac OS X;

To install MediaWiki

  1. Download MediaWiki from official site;
  2. Follow installation instructions and comprehensive MediaWiki Installation Guide
  3. Also read Upgrading to MediaWiki 1.8.

To set the wiki’s page title

  1. Edit MediaWiki:Pagetitle accordingly.

Drag and drop the URL into text will give you the page title, e.g. AardRock » Diamant » MediaWiki:Pagetitle.

To duplicate a Wiki instance

  • Source: server running MediaWiki 1.6.2 on aardrock.com (running some Linux flavour).
  • Target: laptop running a clean install of MediaWiki 1.8.2 on flair.beach.aardrock.com:~Martien/Sites/wiki/ (my PowerBook G4 running Mac OS X 10.4.8).
  • Don't want to interfere with the existing Wiki database, so we'll set up a separate database using the same MySQL instance.
  • Different database name.
  • Different database table prefix.
  • Setting database grants correctly.
  • Different site name.
  • Different accounts and passwords.
  • Eliminating index.php from the URL.
  1. On the source machine , dump the database into an SQL file:
    • mysqldump -u root -p wikidb >~/cheetah_wiki.sql
  2. Switch to the target machine and securely copy all relevant files:
    • SQL dtabase dump;
    • Make a backup copy of your current LocalSettings.php;
    • LocalSettings.php, your MediaWiki identity; avoid overwriting your current version and use a different filename for LocalSettings.php;
    • Any extensions; verify that your extensions will also run on the target version of MediaWiki;
    • Any modified skins;
    • All your uploaded images;
% cd ~/Sites/wiki
% cp LocalSettings.php LocalSettings.php-PebbleBeach
% scp martien@aardrock.com:~/cheetah_wiki.sql .
% scp martien@aardrock.com:/srv/www/htdocs/mediawiki/LocalSettings.php LocalSettings.php-AardRock
% scp martien@aardrock.com:/srv/www/htdocs/mediawiki/extensions/'*' .
% scp martien@aardrock.com:/srv/www/htdocs/mediawiki/skins/Aardrock.php .
% scp -r martien@aardrock.com:/srv/www/htdocs/mediawiki/skins/aardrock .
% scp -r martien@aardrock.com:/srv/www/htdocs/mediawiki/images .
% cd .. && mv wiki w
  1. In LocalSettings.php-AardRock:
Change Variable: From: To:
$wgSitename "AardRock" "PebbleBeach"
$wgScriptPath "" "/w"
$wgArticlePath "$wgScriptPath/$1" "/wiki/$1"
$wgDBname "wikidb" "aap"
$wgDBprefix "cheetah_" "Flair"
$wgDBpassword "DB password on source system" "DB password on target system"
  1. Add the following lines to the end of LocalSettings.php-AardRock NOTA BENE accesscontrolSettings do not work in MediaWiki 1.8.2:
require_once("extensions/accesscontrolSettings.php");
include("extensions/accesscontrol.php");
  1. Set the database grants for the new database appropriately
% mysql -u root -p
Enter password: ********
mysql> grant SELECT, INSERT, UPDATE, DELETE, CREATE TEMPORARY TABLES on aap.* to 'wikiuser'@'localhost';

You can now easily switch between the two!

To switch to the Pebble Beach Wiki

cp LocalSettings.php-PebbleBeach LocalSettings.php

Test it and browse to http://flair.beach.aardrock.com/wiki/ to find that Wiki's content.

To switch to the AardRock Wiki

cp LocalSettings.php-AardRock LocalSettings.php

Test it and browse to http://flair.beach.aardrock.com/wiki/ to find that Wiki's content.

Seems like the beginning of a recipe for setting up a Wiki farm…