Install MediaWiki on Mac OS X

How to Install MediaWiki on Mac OS X.
These are the installing procedures needed to get MediaWiki installed on Mac OS X. This recipe was developed during a two week period in March 2005. While this works great for me (long and tedious as it might be) your mileage may vary.
This software was installed on Mac OS X 10.3.8
== Download and Install MAMP (Mac OS Versions of Apache, MySQL, and PHP) ==
The sections following this describe separate installation of MySQL and PHP. Fortunately, the entire package of prerequisites for MediaWiki -- Apache, MySQL, and PHP -- have been packaged together as MAMP, which can be installed and configured very easily. If MAMP is installed and configured, there is no need to perform separate installations of MySQL and PHP, and the user can skip to the database creation, MediaWiki installation, and configuration steps (beginning with "Configure Database").
== Installing MySQL and PHP the Hard Way ==
=== Download and Install MySQL ===
*First of all. Don't use the latest and greatest version of MySQL. The 4.1.x version promoted on the site is NOT compatible with the latest version of phpMyAdmin, needed to get the MySQL database up and running properly. Download the latest stable 4.0.x version and go from there. The only thing worth grabbing from the 4.1.x package is the MySQL.prefpane that you might use to start/stop MySQL from the System Preferences. This makes it easier to start and stop MySQL.
*Optionally download the 4.1.x package from mysql.com and copy the MySQL.prefpane to /System/Library/PreferencePanes. This item will appear the next time you open System Preferences.
*When you get the dmg from MySQL.com, double click and install both packages (run time and boot loader).
*Open System Preferences and select the MySQL Prefs panel (bottom of the screen). Click on the start button. It will prompt for administrator's password. Check the boot loader option so mysql will automatically start up the next time Mac OS X starts.
=== Download and Install PhpMyAdmin ===
*Download and install the latest version of phpMyAdmin from http://www.phpmyadmin.net/home_page/. Be sure to unpack the tar file using gnutar rather than allowing Stuffit to do it. There are complications with Stuffit changing the line endings in text files that prevent phpMyAdmin from working properly.
*Rename this phpMyAdmin-x.x.x folder to phpMyAdmin and move to /Library/WebServer/Documents.
*Open your web browser and connect to your server/workstation address http://serverhostip/phpMyAdmin/index.php. Since we are running without security, it should come right up as the defaults are to look for the MySQL instance on localhost.
== Configure Database ==
*Create a new database for Wiki. The default name that the Wiki comes configured for is wikidb, but you can use any name and change when you configure Wiki.
*Create a new user that Wiki will use to control it's database. The default config is wikiuser. Here again you can use whatever you like as the Wiki install will allow you to select an alternative wiki user id.
== Download and Install MediaWiki ==
*Download the latest version of MediaWiki from http://www.mediawiki.org/. For this installation on Mac OS X, I used [1.4rc1]
*Like phpMyAdmin, be sure to use gnutar to unpack the tarball instead of Stuffit. Rename the resultant mediawiki-x.x.x folder name to wiki and move to /Library/WebServer/Documents.
== Configure Wiki ==
*At this point, you should be able to engage Wiki and start the config. The URL will be on the same server as http://serverhostip/wiki which will prompt you to config. DO NOT click the config link just yet. Perform the next step before doing so.
*Before you can run the config process, the config directory will need to be world writeable. Enter this Unix command to make it so:
 chmod -R 777 /Library/WebServer/Documents/wiki/config
*Follow the config link to a form page that will prompt for host name of MySQL (locahost), wikiuser and password, WikiSysop user and password and a few other things. Press the submit button and it will attempt to install all the choices.
*From here, the PHP script will perform a few checks, populate the database and create a LocalSettings.php file in the wiki/config directory. DO NOT press the link that says go to the main web site. Rather, copy the LocalSettings.php file from wiki/config/LocalSettings.php to wiki/LocalSettings.php.
*Once complete, click the link to go to what will become your Wiki home page, http://serverhostip/wiki/index.php/Main_Page. If everything went well, click on this link and you're all set.
*From here, be sure to create a new user in your Wiki to help in tracking your Wiki entries in the database.
== Creating new entries ==
*In the WikiPedia implementation of MediaWiki, when searching for a page, you will get a results page that will allow you to create a new empty page. However, this open source version seems to be lacking in this area. In order to create a new entry, type a URL like this:
 http://serverhostip/wiki/index.php/New_Entry_Name
You should be home free from here. All further documentation you will need to operate Wiki can be easily found online on the http://meta.mediawiki.org web site.
== External Links ==
*MediaWiki Sourceforge SIte
Category:Tutorials