Wiki installation on Mac OS X
Revision as of 10:55, 27 December 2006 by Martien (talk | contribs) (→To install MediaWiki: Upgrading to MediaWiki 1.8 link)
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
- Download PHP from Marc Liyanage and:
- 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
.
- Installs in
To install MySQL
- Download MySQL from official MySQL site;
- Follow instructions on Installing MySQL on Mac OS X;
To install MediaWiki
- Download MediaWiki from official site;
- Follow installation instructions and comprehensive MediaWiki Installation Guide
- Also read Upgrading to MediaWiki 1.8.
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.
- On the source machine , dump the database into an SQL file:
mysqldump -u root -p wikidb >~/cheetah_wiki.sql
- 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
- 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"
|
- 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");
- 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.