Windows + IIS + CygwinPerl Installation Cookbook

ALERT! WARNING: THIS DOCUMENT DOES NOT APPLY TO TWIKI-4 though you may be able to extrapolate some steps from here

This document should be used with Caution. Unless you consider yourself expert with Cygwin, IIS and Perl you should use the Apache/Cygwin-based WindowsInstallCookbook? instructions.

I say this because: Going forward, I'd like to suggest that: Buyer beware... beyond this point lie dragons.

-- MartinCleaver - 10 Jul 2003


This topic provides a short list of outcomes and main traps MarkusKling? encountered while installing TWiki for the first time on Windows, CygwinPerl? and IIS. Please start reading at the WindowsInstallCookbook since here you will only find very brief descriptions of the minimum required steps.

Software Requirements

Installation

CYGWIN

RCS

IIS

Configure TWiki

Code Changes

Authentication

The TWiki can interact with the built in IIS authentication. So you can map users from your NT domain to TWiki users while providing their case sensitive intranet-login name via registration. Use the ASP below to query your actual username.

   example.asp
   <%=Request.ServerVariables("AUTH_USER")%>

In order to receive a TWikiGuest? when the user is not remembered edit TWiki::userToWikiName and change
   my $wUser = $userToWikiList{ $loginUser } || $loginUser;
   to
   my $wUser = $userToWikiList{ $loginUser } || $defaultUserName;
Then edit TWiki.cfg and set the defaultUserName to WikiGuest.

-- MarkusKling? - 15 Jul 2002

In the Application for the bin directory, I had to add -T to the perl command associated with the .pl extension in order to get around a Too late for for "-T" option error when testing view.pl (IIS 5.1 on WinXP). Also, for pubDir, templateDir, and dataDir I had to use Windows notation to get view.pl to work (i.e. /c/TWiki/pub didn't work, but c:\\TWiki\\pub did work). TWiki20011201.zip.

-- DavidMurray? - 10 Oct 2002

The /c/TWiki/pub notation doesn't work because you are using ActivePerl not CygWin Perl. I've also made an update above so people don't need to edit Search.pm. The WindowsInstallCookbook? settings for fgrep and egrep options (-F and -E, I think) can be used if you have problems.

-- RichardDonkin - 06 Dec 2002

"Point wikiHomeUrl, defaultUrlHost, scriptUrlPath, pubUrlPath, pubDir, templateDir, dataDir to the appropriate pathes. Use fully qualified names in "/" notation for your paths! " "Edit rcsDir, revInitBinaryCmd, revCiCmd, revCiDateCmd, revCoCmd, revHistCmd, revInfoCmd, revDiffCmd, revDelRevCmd, revUnlockCmd, revLockCmd, revBreakLockCmd. Use "d:\\" notation and add ".exe" to the commands. "

"Create Virtual Directory pointing to your twiki directory". Which is the twiki directory

installdir/twiki?
installdir/twiki/data?
installdir/twiki/data/twiki?
installdir/twiki/data/main?

I wish I understood what these meant and what I should change them to. A little more handholding in the instructions would be nice.

I think it would be insightful to have a complete example. List the virtual dirs set up in IIS, the absolute directories twiki is installed to, and a concrete example of every variable listed above.

-- DougRansom? 24 Dec 2002 --

For W2K? Server with IIS & ActiveState had to add the -T to the perl command. It looks like this: D:\apps\Perl\bin\perl.exe -T "%s" %s

I don't understand the motivation to remove the 2>&1 1>$TWiki::nullDev from all commands and have not yet done this.

It worries me that I see a shell flash on the server when I edit a wiki page using a browser running on the server itself.

-- DougRansom? - 24 Dec 2002

I followed the mount instructions (to the best of my ability anyway ☻) The value for data dir /d/apps/twiki/data/ doesn't work, but d:/apps/twiki/data/ does work. "mount" displays:

d: on /d type system (binmode)

I think this is causing me problems and the one area I could really use some help on.

-- DougRansom? - 24 Dec 2002

A performance improvement may be possible using ISAPI instead of CGI to run the perl scripts. ISAPI for perl

-- DougRansom? - 25 Dec 2002

Hi Doug, don't worry wink

-- MarkusKling? - 26 Dec 2002

I have not actually tried the Perl ISAPI filter yet instead of the CGI because I have yet to get twiki working. I am having problems similar to GettingRCSToWorkWithIIS? . I can change a page, and view the change in wiki, but others cannot edit the same wiki page because its locked by me (even though I have a finished my edits), and my changes never show up in the diffs and the rcs version number does not increase. Obviously, my edits are not sucessfully checked in.

I thought this might bee due to the mount behavior I described on Dec 24.

I am at a loss of what to do next. I am using ActiveStatePerl? . All help appreciated.

-- DougRansom? - 26 Dec 2002

Finally after hours of digging around, I found I had to change LOGNAME to "nobody". The instructions above say "anonymous". During hacking about, I also changed some environment variables, tried cygwin perl (didn't get it going), went back to activeState perl, and gave everyone full access to the twiki directory. Not sure which of these are required.

-- DougRansom? - 30 Dec 2002

Attachments don't work, but otherwise RCS seems to work. I am curious as to whether I have incorrectly set one of the variables in twiki.cfg -- I have attached that file to DougsInstallOnIIS.

-- DougRansom? - 30 Dec 2002

Just found a useful page with Tips on IIS4 and Perl while looking for something else smile

-- RichardDonkin - 23 Feb 2003

Have these instructions been tested with the Beijing code base? Against IIS 5.1?

-- MarkLevison? - 27 Feb 2003

MarkLevison? , I'm currently trying to install Twiki 20030201 onto Windows XP Pro with IIS 5.1 ... so far I have found some discrepancies but a skilled person should be able to get it working anyway.

I am discovering that I am not skilled enough for this. But then again, some webserver and perl skills are stated in the requirements to use Twiki, so this is more a blame on me than on Twiki. So far, I have it partially running but I grapple with some configuration issues to make the Perl (v5.6.1) run without complaints.

I chose to not use ActivePerl v5.8 even though I have it, because I was afraid it would get even more complicated (more discrepancies). I've read here on Codev that there are issues with v5.8 as well, so I thought v5.6.1 was the safer road.

-- TorbenGB - 10 May 2003

Common Traps

Mount failing for RCS

Cygwin apparently changed the Mount command. "mount -b C:\ /c" doesn't seem to work try:

"ln -s /cygdrive/c/ c"

It will create a symbiolic link to the C drive, which was automounted by Cygwin under the cygdrive directory and thus mount barfs on it.

-- NormanKing? - 03 Sep 2002

The problem here is that you are using the Cygwin shell (bash), which interprets '\' specially, and are specifying c:\ instead of c:/ with the CygWin mount command. Alternatively, you can type c:\\ (because '\' is a special character it must be doubled), but it's easier to use c:/, which works OK with ActivePerl, Apache and almost all Windows programs as well (the main exceptions are Microsoft Office and cmd.exe / command.com).

The following works with the latest version of Cygwin:
$ mkdir /c $ mount -b -s c:/ /c $ mount ... c: on /c type system (binmode) ... 

This is a bit cleaner than using symbolic links, since you can type mount to see the mappings, and works OK for filename completion as well.

I have fixed the cookbook's mount command (in cygwin section, above) to use e:/, since this will work in all cases, and the cookbook said to run the cygwin.bat command.

One Cygwin tip - create a shortcut to C:\cygwin\bin\bash.exe --login and use that instead of the cygwin.bat file - this avoids starting up a virtual DOS machine and is much faster.

-- RichardDonkin - 04 Sep 2002

Further modifications

Index Server

IndexServerSearchForMsIisAddOn? provides a way to replace the SearchCgiScript with one that uses MS Index Server.

-- MartinCleaver

 

BasicForm edit
TopicClassification SupportQuestion?
Topic Summary
Interested Parties
Related Topics

This topic: Support > TWikiOn > TWikiOnWindows > FoswikiOnWindows+IIS+CygwinPerl
Topic revision: 19 Apr 2009, JendaKrynicky
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads