TWiki on Mac OS X Tiger
Installer for TWiki 4.1.1
NOTE: This is an outdated package, latest release is
TWiki 6.1.0
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.
--
BryanLarsen - 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
/Users/username/Sites thing entirely if you want to install in the
/Library/WebServer/Documents 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
/Users/yourname/Sites/wiki.
- 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
- Edit
/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/"
<Directory "/Users/yourname/Sites/wiki/bin">
AllowOverride all
Options +ExecCGI
Allow from all
</Directory>
<Directory "/Users/yourname/Sites/wiki/data">
Deny from all
</Directory>
<Directory "/Users/yourname/Sites/wiki/lib">
Deny from all
</Directory>
<Directory "/Users/yourname/Sites/wiki/templates">
Deny from all
</Directory>
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.
Configure TWiki
Start up TWiki
Change Authentication
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.
- rename
htaccess.txt to .htaccess in /Users/yourname/Sites/wiki/bin
- edit
.htaccess and run these commands....
- Change the path to TWiki
-
:g?!FILE_path_to_TWiki!?s??/Users/yourname/Sites/wiki?g
- 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
.htaccess file.
Trouble shooting
Where can I see any error messages?
The Apache error log can be found on
/var/log/httpd/error_log. Get the last lines with
tail /var/log/httpd/error_log. I use BBEdit to peruse the log file, by calling from Terminal:
bbedit /var/log/httpd/error_log.
CGI::Session is missing
You need
CGI:Session. If it is not installed on your system, enter on the command line:
cpan
install CGI::Session
Can't use search
Couldn't search with my installation and was getting repeated errors in configure that
fgrep and
egrep were not being found in the default directory (/bin). Changed their directory in configure from
/bin to
/sw/bin 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
whereis fgrep 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
777.
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 above.
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,
/Users/aaron/Sites/wiki/logs rather than
/wiki/logs.
Configure preferences
Test each aspect
Start writing!
Read the
TWikiInstallationGuide for any other details.
--
Contributors: SwaroopCH,
AndreUlrich,
SueBlake,
AaronVegh,
ArthurClemens and other commenters -- refactored page 22 Apr 2007
Discussion
Error:
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.
--
BobKing - 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
touch data/Main/JosephBloggs.txt (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.
--
SueBlake - 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 where
MacOS is used as client or server.
--
RichardDonkin - 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.
--
LarryRudolph - 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.
--
SueBlake - 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...
--
MichielVerbruggen - 05 Feb 2007
I am having a problem with using
pseudo-install.pl -link that creates symlinks to plugin directories: for instance I cannot
chmod pub/TWiki/PatternSkin to 777 - the symlink does not get changed. This results in stylesheets not getting loaded because of a permission problem.
--
ArthurClemens - 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!
--
DaveCampbell - 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.
--
DavidWolfe - 21 Jan 2008