UseModWiki | RecentChanges | Preferences

Installing UseModWiki on Mac OS X

The Mac OS X web server is Apache, so you can modify the Apache configuration files to get it working like any standard UNIX Apache installation and use the typical UseModWiki/Install instructions.

However, you can quickly get it up and running with the standard Mac OS X configuration by following these steps:

  1. In System Preferences->Sharing->Services, start Personal Web Sharing if it is not already enabled.
  2. Download UseModWiki and expand it.
  3. Copy wiki.pl to /Library/WebServer/CGI-Executables
  4. Edit the DataDir variable in /Library/WebServer/CGI-Executables/wiki.pl to specify the directory where your data will be (for example, "/Users/MyName/wikidb").
  5. Create the DataDir directory, then make sure that the 'www' user can write to it. (For example, "mkdir /Users/MyName/wikidb" followed by "chmod a+w /Users/MyName/wikidb" or "sudo chown www /Users/MyName/wikidb".)
  6. Copy the config and intermap files to the DataDir. Modify the config file if you want (but it is not necessary).
  7. Copy wiki.gif and wiki.css to /Library/WebServer/Documents.
  8. Try the URL http://localhost/cgi-bin/wiki.pl to test whether it's working.
  9. Start creating pages, and customize things to your heart's content.

Certainly there must be somebody out there who's figured out how to run the UseModWiki locally on their OSX Macintosh? Would love to be able to take my own little wiki everywhere my laptop goes. --MichaelHerman

  1. Put the wiki script in /Library/WebServer/CGI-Executables/
  2. Edit the script in TextEdit and change the DataDir
  3. I've had to create the datadir manually, and set its write permissions with chmod in Terminal

I have done this much now. Still not sure... What is the right syntax for DataDir? ...and what do you set as path to perl? I'm getting Internal Server Error message. Am hoping/guessing that this is bad path to DataDir as I think permissions are all set correctly.

The Internal Server Error message usually means that the script crashed. If you had a bad path, the script should complain that it couldn't create the DataDir. One common problem is creating a syntax error when editing the script (by not closing quotes or forgetting the semicolon ';' character at the end of the line).

I recommend trying to test the script without editing (see below). (If you leave the DataDir at its default setting, the wiki will be stored under /tmp (a temporary directory).) --CliffordAdams

The new, unedited, script still crashes, so I'm stymied at Step 4 below. Clues? --MichaelHerman

My first thought is that there is still some problem with permissions or ownership of the script file. Try going into Terminal and running the following command:
     ls -la /Library/Webserver/CGI-Executables

Also, perhaps you can find a more specific error message by running the following command (also in Terminal, presuming the wiki is named "wiki.pl"):
     perl /Library/Webserver/CGI-Executables/wiki.pl

Also, how are you extracting the "wiki.pl" file from the tar (.tgz) file? It's conceivable that something got mangled there. I will try to get back to this issue soon. --CliffordAdams (who has UseModWiki running on his Ibook)

Many Thanks, Cliff. Ran the commands and found nothing remarkable (to my untrained eye) so downloaded and unstuffed a new copy. All good... except the new wikidb file created automatically has owner as "www" and it won't let me add files to it?

Got it! No need to mess with Terminal... just select wikidb in the finder and use Get Info window to edit ownership. Click on lock, as admin, to edit. Whew!!! I'm live! Many Thanks, Cliff. --MichaelHerman

You're welcome. The reason the wikidb is owned by "www" is that it was created by the script (which runs as the user "www"). I usually recommend keeping the owner as "www" (so that the script can create new files and/or directories), but I guess it could work with another owner (as long as the www user can write to it). --CliffordAdams

Good call. I needed to shift it back to "www" so it could generate a Preferences page for me. It could make new pages, but not new user pages while owned by "mherman". Hmmm... maybe now it will access the config file. so far, no luck with that one.

Config mystery solved. I'd saved it earlier in OSX TextEditor and when I just resaved in BBLite in Unix instead of Mac format, suddenly config file is usable by the script. All set! --MichaelHerman

The following is from an email I sent a few weeks ago. --CliffordAdams

Instructions for installing UseModWiki 1.0 under Mac OSX (tested with 10.2). Last updated January 9, 2004

1. First, you need to enable personal web sharing on your system. Go to the System Preferences application (under the Apple menu), and select the "Sharing" icon. Then select the "Services" tab, and place a check in the "Personal Web Sharing" checkbox. Finally, close the "Sharing" window.

2. To test the web sharing, start up a browser and go to: http://localhost/ ...if it works, you should see a web page. (The default page under 10.2 is an Apache test page.)

3. Double-click on the usemod10.tgz file to expand it. Copy (or move) the "wiki.pl" file to /Library/Webserver/CGI-Executables (You can rename "wiki.pl", but you might need the filename to end with ".pl" or ".cgi".)

4. Test the wiki by visiting: http://localhost/cgi-bin/wiki.pl ...if it works, you should see a "HomePage" page. NOTE: at this point pages are stored in a temporary directory. You must do the following steps for permanent storage.

5. The next step is to create a permanent storage directory for your wiki site(s). The best way to do this is to create a "holding" directory which will contain the wiki $DataDir directory.

Here is an example:

If your login name is "cliff", then your files will be stored under "/Users/cliff". You will then create a "holding" directory called "wiki" ("/Users/cliff/wiki"), and use a $DataDir setting like "/Users/cliff/wiki/notes". NOTE: Do *NOT* create the "notes" subdirectory--let the wiki software do it for you in a later step.

To create this directory, open up a Terminal window and type the following commands:

cd ...to return to your home directory.

mkdir wiki ...to create the directory

chmod 777 wiki ...to allow the webserver/wiki to write to this new directory.
Do not use chmod 777 on a webserver anyone else has access to. You are allowing anyone to add, change or delete anything in your wiki. If nothing else works, use chmod 1777 (which only lets random people add but not delete), or better yet, learn how to set ACL's and add the webserver user to the list.

cd wiki ... enter the new directory

pwd ... display the new directory name

Write down the output of the "pwd" command--you will use this as part of your $DataDir setting. (Note that "/Users" starts with an uppercase letter--it is case sensitive.)

[If you are concerned about the chmod command, you can chmod it back to 755 after the wiki directory is created in a later step. This is only a (minor) concern for a wiki on a public OSX system, not a personal system.]

6. Read the INSTALL document that was included with the wiki distribution. If you are using multiple copies of the wiki software, make sure to choose a different wiki name for each (for cookies).

7. Edit wiki.pl in the CGI-Executables folder (TextEdit is fine for this), and set $DataDir and other settings. Set the $DataDir to the output of the "pwd" command, plus a slash and a word describing the wiki. For example, if the output of the "pwd" command above was "/Users/cliff/wiki", and it is a wiki for your notes, you could set the $DataDir to the following:

$DataDir = "/Users/cliff/wiki/notes"; # Main wiki directory

Save the file and exit the text editor.

8. To test (and use) the wiki, visit the following URL: http://localhost/cgi-bin/wiki.pl (The "notes" directory will be created the first time you use the wiki.)

9. Intermap, config file settings... (I don't have time to write these up now, but you don't need them to get started.)

end of emailed instructions

UseModWiki | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited April 22, 2007 9:35 pm by MarkusLude (diff)