r3 - 28 Sep 2007 - 06:48:15 - RichardDonkinYou are here: TWiki >  Codev Web > TWikiOnWindowsArchive
Tags:
, create new tag
This is an archive of older information and tips - see TWikiOnWindows and TWikiOn for pointers to current installation techniques.


I've moved all the stuff that should be no longer relevant to here. See WindowsInstallCookbook instead of here. If there is anything you needed in this topic, please comment in WindowsInstallCookbook

  • I suggest that we retire or delete this document by the end 2002.

-- MartinCleaver - 15 Sep 2002

(Attachments are now on this topic, moved from TWikiOnWindows. -- RD)

--

Re TWikiAlphaRelease as of Apr 2002:

  • There is a lot more code in testenv, and comments in TWiki.cfg, to address TWikiOnWindows issues and to help diagnose common problems. See CookbookActivePerlTestenv to download the latest testenv, which also works on TWiki Sept 2001 or higher.
  • I develop for TWiki using Windows (mainly CygWin) and Linux, which helps to make sure that it works well on both. See WindowsInstallCookbook for the easiest way to install.
  • If you have a choice of Linux or Windows: Linux is about twice as fast as Windows for TWiki, for the same hardware, unless you use ModPerl, which is still not straightforward on Windows.

-- RichardDonkin - 06 Apr 2002

Regarding the Sept 2001 version:

  • JohnTalintyre did his TWiki development alternating between Win2K? and Solaris. As a consequence TWiki is now a lot more Windows friendly than any previous version.

  • The main thing to know about is the safeEnvPath feature - new in this version. This must include a reference to $rcsdir so that when rcsdiff runs it can find $rcsdir/diff.exe
  • CygWin needs to be installed but is used only for fgrep, egrep and ls. (This is slightly misleading, albeit unintentionally. CygWin is needed for two things. First to allow Cygwin versions of fgrep, egrep, and ls to run at all, and secondly to cause the underlying Perl shell command processing to be unix shell-like, via the Cygwin provided Bash shell. -- JonathanGBressel - 27 Dec 2001)
  • On Windows ActiveState Perl is preferred, but to use the testenv script first see CookbookActivePerlTestenv.
    • This is no longer true - using CygWin Perl is much easier, since you can install Perl, RCS and Unix tools in one step, and it works well with less configuration hassle in my experience. See WindowsInstallCookbook for the details. [ RichardDonkin ]

If you are using Apache you don't need to rename the .pl suffixes if

  1. you configure your .htaccess file in the bin directory so it will recognize the scripts without the .pl suffix (add AddHandler cgi-script . to it) and
  2. update the she-bang to point to the full path where perl can be found

-- MartinCleaver - 29 Sep 2001

If you have used these instructions and been successful or unsuccessful, can you please add a comment to this page or, preferably, help make this page more readable. I cannot see me having much time to do much more work refactoring this page now, if you feel that you do, please assume ownership :^) -- MartinCleaver (Comments moved to end)

Refactoring in progress..... -- HansDonner

see also:

and have a look at the Windows related topics (a search for now, should be included in the text later on):

Results from Blog web retrieved at 05:31 (GMT)

Results from Codev web retrieved at 05:31 (GMT)

Results from Plugins web retrieved at 05:31 (GMT)

Results from Sandbox web retrieved at 05:31 (GMT)

Results from Support web retrieved at 05:31 (GMT)

Results from TWiki web retrieved at 05:31 (GMT)

Results from TWiki02 web retrieved at 05:31 (GMT)

Results from TWiki03 web retrieved at 05:31 (GMT)


Some notes on using TWiki on a Windows environment

For an overview of known working Windows environments

RequiredEnvironmentForTWiki

In order to run TWiki, the system should comply to the RequiredEnvironmentForTWiki. These include:
  • CGI capable http server
  • Perl 5
  • RCS
  • Access to Unix commands: ls, fgrep and egrep

CGI capable http server

Several qualifying webservers are available. Reported to work:
Web server See also Comments
Apache TWikiOnWindowsUsingApache http://www.apache.org/

Perl 5

ActiveState has a Perl build for Windows

Also Cygwin (see Unix Commands) seems to include a Perl build.

RCS

An RCS build for Windows is available from as rcs57pc#.zip. # Can be:
  1. Binary files
  2. Documentation
  3. Source files

Or read the GNU Emacs FAQ For Windows for where to get RCS:

Unix commands

The needed unix commands are included in a unix library for windows called Cygwin

see also:

Adjusting the Windows environment

Have the PATH include the location of

  • the Cygwin's bin directory (depends on installation, may look like \cygwin\bin)
  • the RCS bin directory (depends on installation)
  • the perl bin dictory (depends on installation, in case of ActiveState's version it may look like \perl\bin)

  • [ HansDonner ] I haven't tested if this is really required.

Optionally you could set the PERL5LIB environment variable to the location where the TWiki lib directory can be found (it build the @INC variable used in Perl).

Configuring TWiki

The TWiki.cfg file contains some inline comments regarding the setup on a Windows environment. In the beta of Aug 25th, TWiki tries to identify the system it's run on, and sets some of it's environment specific settings.

  • When specifying paths, use the slash instead of the backslash, eg. "c:/twiki/data"; instead of "c:\twiki\data";
  • You may set the $scriptSuffix to =$scriptSuffix = ".pl" =. This is not required!
    • In case of using apache you could add AddHandler cgi-script . to the apache configuration or to the .htaccess file in the bin directory
    • If you do set it to ".pl", be sure to rename all the scripts in the bin directory, and modify the .htacess file.

Setting up the scripts

The she-bang line has (probably) to be modified. All scripts start with #!/usr/bin/perl. Change the /usr/bin/ part to the directory where perl can be found, like #!/perl/bin/perl. If perl is in the PATH then it could also be just #!perl

  • Note that you can automate this as follows, once Perl is installed.
    • Type the following very carefully at a command prompt - do TEST THIS on a dummy .pl file first. It does back up all Perl files from foo.pl to foo.pl.bak:
      cd twiki\bin
      copy view.pl foo.pl
      perl -pi.bak -e "s;^#!/usr/bin/perl;#!perl;" foo.pl
      type foo.pl
      del foo.pl
    • Once you are happy this is working, just run the Perl command again, using *.pl instead of foo.pl - Perl edits the files in-place.


Old Notes (being refactored above)

WebServer Specifics:

There is a very complete listing of HTTP servers at http://webcompare.internet.com/

Getting RCS to work

From RCSConfigurationOnWindows:

a) Either the USER or LOGNAME variable must contain the user's (i.e. your) last name, unless you have network software installed and want to use the name with which the user is logged on to the network (see below). In this latter case, you need not set one of these variables, if RCS is able to detect the logged