Difference between revisions of "Wiki installation on Mac OS X"
Jump to navigation
Jump to search
(Initial version.) |
(Added: To duplicate a Wiki instance) |
||
Line 22: | Line 22: | ||
#[http://www.mediawiki.org/wiki/Download Download MediaWiki] from official site; | #[http://www.mediawiki.org/wiki/Download Download MediaWiki] from official site; | ||
#[http://www.mediawiki.org/wiki/Installation Follow installation instructions] and [http://meta.wikimedia.org/wiki/Help:Installation comprehensive MediaWiki Installation Guide] | #[http://www.mediawiki.org/wiki/Installation Follow installation instructions] and [http://meta.wikimedia.org/wiki/Help:Installation comprehensive MediaWiki Installation Guide] | ||
=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. | |||
*Different site name. | |||
*Different accounts and passwords. | |||
*Eliminating index.php from the URL. | |||
#On the source machine , dump the database into an SQL file: | |||
#*<code>mysqldump -u root -p wikidb >~/cheetah_wiki.sql</code> | |||
#Switch to the target machine and securely copy all relevant files: | |||
#*SQL dtabase dump; | |||
#*Make a backup copy of your current LocalSettings.php; | |||
#*<code>LocalSettings.php</code>, 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: | |||
|- | |||
|<code>$wgSitename</code> | |||
|<code>"AardRock"</code> | |||
|<code>"PebbleBeach"</code> | |||
|- | |||
|<code>$wgScriptPath</code> | |||
|<code>""</code> | |||
|<code>"/w"</code> | |||
|- | |||
|<code>$wgArticlePath</code> | |||
|<code>"$wgScriptPath/$1"</code> | |||
|<code>"/wiki/$1"</code> | |||
|- | |||
|<code>$wgDBname</code> | |||
|<code>"wikidb"</code> | |||
|<code>"aap"</code> | |||
|- | |||
|<code>$wgDBprefix</code> | |||
|<code>"cheetah_"</code> | |||
|<code>"Flair"</code> | |||
|- | |||
|<code>$wgDBpassword</code> | |||
|<code>"''DB password on source system''"</code> | |||
|<code>"''DB password on target system''"</code> | |||
|} | |||
#Add the following lines to the end of LocalSettings.php-AardRock {{NB}} accesscontrolSettings do not work in MediaWiki 1.8.2: | |||
require_once("extensions/accesscontrolSettings.php"); | |||
include("extensions/accesscontrol.php"); | |||
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. |
Revision as of 10:46, 27 December 2006
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
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.
- 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");
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.