TWiki on Mac OS X Tiger
Installer for TWiki 4.1.1
This is an outdated package, latest release is TWiki 6.0.2
I've packaged TWiki up into an easy to install package for Mac OS X 10.4 (Tiger) and attached it: twiki-4.1.1.dmg
(Mac Disk Image
format). It generally automates the instructions given on the rest of this page (including many of the instructions in the comments). The major exception is that it installs to ~/Sites/twiki rather than ~/Sites/wiki. Your new twiki is accessible at http://localhost/twiki/
After installation, you are automatically redirected to http://localhost/twiki/bin/configure
. There you will need to set up authentication; the easy way is to switch the login manager to TemplateLogin. See TWikiUserAuthentication
You will also need to change the e-mail settings.
You may wish to create another user with administration privileges and install as that user rather than using your personal username.
There are two packages inside the .DMG. One installs CGI
::Session from CPAN
and the other installs and configures twiki. Changes to apache configuration files are put inside of ### START TWIKI
and ### END TWIKI
tags. If you reinstall, everything inside these sections will be replaced, but the rest of the apache configuration files will be left alone.
Reinstallation of these packages will result in a virgin twiki install, overwriting existing files in ~/Sites/twiki.
I've also attached the source to the installation scripts. Updating for new versions of twiki is really easy, just change the version number at the top of the Makefile and run make. The only thing that may need to be tweaked is dist/scripts/postflight.
Questions/Comments/Concerns to bryan@larsenPLEASENOSPAM.st
- 19 Feb 2007
Installation on Mac OS X 10.4 Tiger
This is my installation notes for TWiki on Mac OS X 10.4 Tiger on my personal PowerBook. Security concerns are not addressed in this howto (maybe MacOSXInstallNotes
is of help for security?).
You might want to make a new user called "twiki" or something and run the install from them. That way it keeps the files separate from your personal website. You can also skip the whole
thing entirely if you want to install in the
area. I haven't tried this but it should work.
Download and unpack:
- Fetch the latest stable version of TWiki from DownloadTWiki
- Unarchive the package
- Put the twiki folder from in
- READ THE TWiki Installation Guide, then continue. Yes we do walk you through this but it does help if you read the manual.... Honestly....
changes on httpd-configuration
/etc/httpd/users/yourname.conf and add the following information:
# Added for TWiki :
ScriptAlias /wiki/bin/ "/Users/yourname/Sites/wiki/bin/"
Alias /wiki/ "/Users/yourname/Sites/wiki/"
Allow from all
Deny from all
Deny from all
Deny from all
Changes to setlib.cfg
No changes: with TWiki 4.1.2 you simply let it be created by configure when you run configure to set everything else up, and that saves a lot of work too.
Only for TWiki 4.1.1:
Adjust owner and start webserver
- Change owner of the twiki folder and contents to
www by running
sudo chown -R www /Users/yourname/Sites/wiki
- Check that you have enabled 'Personal Web Sharing" in the System Preferences -> Sharing, or you wont be running Apache.
- Restart Apache if it is already running, run
sudo apachectl graceful, or stop and start sharing in the System Preferences -> Sharing pane.
Start up TWiki
N.B. As of TWiki 4.1 these instructions are unnecessary. Simply switch your LoginManager to Twiki::Client::TemplateLogin for a simpler form of authentication. See TWikiUserAuthentication
.htaccess and run these commands....
- Change the path to TWiki
- Change the URL path to TWiki
:g?!URL_path_to_TWiki!?s??http://localhost??g (this is the same as you set the $defaultUrlHost above)
- Manually add your name to the .htpasswd file (much easier for testing)
htpasswd -c /Users/yourname/Sites/wiki/data/.htpasswd your_wiki_name
- Enter your password twice.
- Now you have an entry in the file, and can test the authentication.
- In a browser, click
edit at the top of the main window. You will get an authentication request. Fill in the credentials, and you should go into edit mode.
- If it works = You are up and running
- If it fails = a typo, or a wrong path. Check the
Where can I see any error messages?
The Apache error log can be found on
. Get the last lines with
. I use BBEdit to peruse the log file, by calling from Terminal:
CGI::Session is missing
. If it is not installed on your system, enter on the command line:
Can't use search
Couldn't search with my installation and was getting repeated errors in configure that
were not being found in the default directory (/bin). Changed their directory in configure from
and no more problems.
Where are fgrep and egrep?
I found that fgrep and egrep were in /usr/bin in my standard OS X 10.4.6 client installation. An easy way to find out is
in a Terminal window.
Page looks strange (Style Sheets won't load)
I had the same problem with the style sheets.
chmod -R -L 644 /Users/username/Sites/wiki
fixes the problem. The -L tells it to follow symlinks, which is off by default on OS X. If that doesn't work, try
You frequently have to chmod and chown the twiki directory, especially if you're installing perl modules and plugins as root. It can cause weird errors. Most issues are caused by permissions so get those down pat.
You have to be root to run those commands and make them work. The way to run a command as root from the commandline is to put the word "sudo" before it, e.g. "sudo chown -R twiki" or whatever. It asks for your (personal) password the first time, and again every few minutes if you're still running root commands.
If you did run this command as root (e.g. using sudo), then the output should be informative. No output at all generally means that a command worked.
Plugin won't work (permission problem)
See Page looks strange
I get log errors
For anyone receiving errors in the log files, note that it needs to be an absolute file path to the logs, not relative. For example,
Test each aspect
Read the TWikiInstallationGuide
for any other details.
-- Contributors: SwaroopCH
and other commenters -- refactored page 22 Apr 2007
Topic save error
During save of file Main
an error was found by the version control system. Please notify your TWiki administrator.
/usr/bin/ci -q -l -m'none' -t-none -w'BobKing' '/Users/twiki/Sites/wiki/data/Main/WebHome.txt' 2>&1
sh: line 1: /usr/bin/ci: is a directory
Go back in your browser and save your changes locally.
After trying to save, The changes are saved, However I get this message.
- 01 Feb 2006
But wait, there's more. Once you've added yourself to the .htpasswd file and it's in the right location, you also have to
(or your own name if you're not Joe) before it will recognise you as a user, that is, before it will allow you to run configure in your browser. Ouch.
- 10 Sep 2006
Some interesting issues with the way MacOS
does Unicode filenames, found a while ago - see MacOSXFilesystemEncodingWithI18N
. This could affect TWiki sites using I18N
is used as client or server.
- 01 Oct 2006
I cannot get configure to work: i get permission errors. In error log it says:
access to /wiki....configure failed, reason: user xxx not allowed access.
I have .htaccess and did htpasswd, but just cannot get configure to run. I get a prompt for name and password, but then it fails, saying something like:
This server could not verify that you are authorized to access the document requested.
- 03 Jan 2007
Larry, what about creating your personal user file like I mentioned in my last comment above?
On the commandline in Terminal, move to the TWiki directory ("cd /Users/larry/Sites/wiki" or wherever it is) and type this without the quotes: "touch data/Main/LarryRudolph.txt" which will create an empty file for your personal home page on the wiki.
(If that command itself bombs out, you might have to log in as someone who has permissions to create a file there.)
Let us know if you still have the problem.
- 07 Jan 2007
Well, no luck for me at all. I have installed Twiki and necessary modules (thanks Niels!) but the system does not let me login. I receive a confirmation message, but Twiki thinks this code is invalid. Nevertheless, I receive a confirmation that I am a registered user...
- 05 Feb 2007
I am having a problem with using
that creates symlinks to plugin directories: for instance I cannot
to 777 - the symlink does not get changed. This results in stylesheets not getting loaded because of a permission problem.
- 25 Feb 2007
I wanted to add that I got twiki up and running sucessfully on Mac OSX in a few hours using these instructions. I've installed it once before on Fedora 6 so I'm a little experienced but I didn't run into too many problems.
Also, I sucessfully exported the filesystem using NFS (using instructions found via google
) and mounted it on my Fedora box. Note that you want to make sure to mount it in the exact same directory as in the local install, otherwise the TWiki confs will get confused. I just mounted the whole damn /twiki directory. This isn't really the place to get into it but I have it working for now. I want to put the filesystem on a SAN (xsan, perhaps) and then use some type of load balancing or clustering for high availability and performance.
So far, apache/perl on OS X seems quite a bit more responsive than on Fedora. I'm not sure the hardware is comparable, since I have it on a 2x 1Ghz G4 with 1.5GB RAM and Raid 1 ATA drives vs. Celeron 2.4ghz with 512MB and 1 hard drive, but it seems a LOT faster. It probably should rock on the Quad-core Xserve!
- 08 Mar 2007
I was able to get TWiki up and running quickly using the installer provided and the provided instructions about running under "Personal Web Sharing." Our TWiki is growing and we now have a brand-new XServe dedicated for it. The problem is there seem to be no documents on TWiki.org that discuss installation on OS X Server's version of Apache. Anyone have any hints?
Also, once we get TWiki running on Mac OS X Server, I'll need to know how to move our existing TWiki webs and users to the new server--another topic that seems to be lacking in coverage on TWiki.org.
- 21 Jan 2008