Windows Install CookbookIntroduction | ||||||||
Changed: | ||||||||
< < |
This cookbook is intended to get you up and running with TWiki on Windows quickly, with as few problems as possible. The 'cookbook' approach is simply to restrict the many choices that someone installing TWiki must make, so that a reasonably well-defined procedure can be followed - new users can simply follow the steps, while experts can use this as more of a guideline. Please read TWiki:Codev.WindowsModPerlInstallCookbook in case you use mod_perl. | |||||||
> > |
This cookbook is intended to get you up and running with TWiki on Windows quickly, with as few problems as possible. The 'cookbook' approach is simply to restrict the many choices that someone installing TWiki must make, so that a reasonably well-defined procedure can be followed - new users can simply follow the steps, while experts can use this as more of a guideline. | |||||||
Changed: | ||||||||
< < |
There is a huge volume of existing material on TWiki about installing on Windows, and I'm indebted to the many contributors for this - the aim of this cookbook is to synthesise the many tips into a recipe that works.
| |||||||
> > |
| |||||||
-- RichardDonkin? - 24 Feb 2002 | ||||||||
Added: | ||||||||
> > |
Summary- See WindowsInstallSummary for a concise summary of the whole cookbook. | |||||||
Recent updates | ||||||||
Added: | ||||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Scope | ||||||||
Line: 44 to 33 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < |
Major version upgrades, such as Apache 2.0 and Perl 5.8, are very likely to cause problems - for example, Apache 2.0 is unable to authenticate (see TWiki:Support.FailedAuthenticationWithApache2OnWinNT) users created by the current TWiki user registration script (due to a feature being removed in 2.0), and Perl 5.8 may introduce issues due to its Unicode features. Even though the Apache group says that Apache 2.0 is the best version, that's not true for TWiki. | |||||||
> > |
Major version upgrades, such as Apache 2.0 and Perl 5.8, are very likely to cause problems - for example, Apache 2.0 is unable to authenticate users created by the current TWiki user registration script (due to a feature being removed in 2.0, see TWiki:Support.FailedAuthenticationWithApache2OnWinNT). Similarly, Perl 5.8 may introduce issues due to its Unicode features and has caused problems due to a bug in CGI.pm . Even though the Apache group says that Apache 2.0 is the best version, that's not true for TWiki at present. For more information, see TWiki:Codev.IssuesWithApache2dot0 and TWiki:Codev.IssuesWithPerl5dot8.
| |||||||
Alternatives | ||||||||
Added: | ||||||||
> > |
The following Windows operating systems have been tested following the instructions given here:
| |||||||
There are doubtless other combinations of components that may work - in particular: | ||||||||
Deleted: | ||||||||
< < |
||||||||
| ||||||||
Deleted: | ||||||||
< < |
| |||||||
Covering the whole range of additional possibilities, particularly web servers, would make this cookbook too complex, and is best handled as a separate activity. | ||||||||
Added: | ||||||||
> > |
For improved performance on Windows through using mod_perl , you may want to try TWiki:Codev.WindowsModPerlInstallCookbook.
| |||||||
Checking versionsIf you already have some of these add-ons installed, here's how to check the versions - this assumes you have TWiki:Codev.CygWin already installed: | ||||||||
Line: 83 to 72 | ||||||||
If you have an older version of any component, do yourself a favour and upgrade it as part of the install process.
Pre-requisites and upgrades | ||||||||
Changed: | ||||||||
< < |
You will need to have local administrator rights and to be comfortable with Windows administration. | |||||||
> > |
You will need to have local administrator rights and be comfortable with Windows administration. | |||||||
This cookbook is intended for a clean install, i.e. none of these components are already installed. However, since Cygwin and Apache's installation process is fairly upgrade-friendly, upgrades should work as well - take backups of all your data and config files first, though! | ||||||||
Changed: | ||||||||
< < |
||||||||
> > |
||||||||
Text editing | ||||||||
Changed: | ||||||||
< < |
Editing Cygwin files is best done with an editor that can handle Unix file format (see the Cygwin binary mode section below) - the installation process includes nano , a non-GUI editor, but if you prefer to use a GUI editor, you should first install PFE, a freeware editor that supports Unix format files. PFE is available on download.com and Simtel.
| |||||||
> > |
Editing Cygwin files should be done with an editor that can handle Unix file format (see the Cygwin binary mode section below). The installation process suggests:
| |||||||
Another good TWiki:Codev.OpenSource editor is SciTE (aka WSciTE), available at http://www.scintilla.org/SciTE.html.
The Unix/Windows Environment | ||||||||
Changed: | ||||||||
< < |
It's a little known fact that you can use pathnames such as c:/apache almost everywhere in Windows - try it in a File Open dialogue box. The main exception is the Win2000 cmd.exe command line shell - here, you must use double quotes around forward slashes, e.g. dir "c:/apache" will work fine.
| |||||||
> > |
It's a little known fact that you can use pathnames such as c:/apache almost everywhere in Windows - try it in a File Open dialogue box. The main exception is the Windows "DOS" command line shell - here, you must use double quotes around forward slashes, e.g. dir "c:/apache" will work fine.
| |||||||
The reason this matters is that '\' is a special character to Perl and other tools, so it's much easier to use '/' everywhere.
| ||||||||
Line: 114 to 104 | ||||||||
The Perl environment | ||||||||
Changed: | ||||||||
< < |
Once Perl has been launched by Apache, it is in Cygwin mode, and so is everything it launches, including ls , egrep , and RCS tools that it (typically) launches with the bash shell.
| |||||||
> > |
Once Perl has been launched by Apache, it is in Cygwin mode, and so is everything it launches, including ls , egrep , and the RCS tools that it (typically) launches with the bash shell.
| |||||||
If you need to use spaces in file names (not recommended), you may be able to put double quotes around the file name in the TWiki.cfg file - however, it's not clear whether all the TWiki code would work with this.
| ||||||||
Line: 128 to 117 | ||||||||
Head to http://twiki.org, click the download link, and fill in the form to request a URL for download. You'll get an automated email, which should arrive by the time you need it.
Apache | ||||||||
Added: | ||||||||
> > |
Steps 1 and 2 can be shortcut by opening the self-installing executable on the Apache website that installs Apache 1.3.x. The painful details below are mainly helpful when detecting where things are going wrong..... | |||||||
1. Download Apache
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
2. Install Apache
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Line: 163 to 152 | ||||||||
4. Install Cygwin | ||||||||
Changed: | ||||||||
< < |
Head to http://cygwin.com, and click the Install Cygwin Now link. Save the setup.exe in a directory, e.g. c:\download\cygwin-dist .
| |||||||
> > |
Head to http://cygwin.com, and click the Install or update now! link. Save the setup.exe in a directory, e.g. c:\download\cygwin-dist .
| |||||||
Now run the Cygwin setup.exe file - this will also install Perl and RCS in one fell swoop.
| ||||||||
Line: 172 to 161 | ||||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Line: 180 to 169 | ||||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Line: 195 to 184 | ||||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
5. Test Cygwin
| ||||||||
Line: 241 to 239 | ||||||||
7. Download TWiki | ||||||||
Changed: | ||||||||
< < |
Download the latest TWiki release from the URL that PeterThoeny sent you, and save it in the c:/twiki directory.
| |||||||
> > |
Download the latest TWiki release from http://twiki.org/ and save it in the c:/twiki directory.
| |||||||
8. Install TWiki | ||||||||
Line: 263 to 261 | ||||||||
1. Configure Apache (part 1) | ||||||||
Changed: | ||||||||
< < |
Using a suitable text editor (e.g. Cygwin's 'nano' , or the Windows PFE editor, unless you already know 'vi' ), edit c:/apache/conf/httpd.conf as follows - this tells Apache where TWiki lives, and removes the need to tinker with the Windows 2000 environment settings.
| |||||||
> > |
Using a suitable text editor (see #TextEditing, above) edit c:/apache/conf/httpd.conf as follows - this tells Apache where TWiki lives, and removes the need to tinker with the Windows environment settings.
| |||||||
| ||||||||
Line: 315 to 312 | ||||||||
Add an AddHandler line to the <IfModule mod_mime.c> section of httpd.conf - this removes the need to rename all the TWiki CGI scripts later in the installation.
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
# # Document types # | ||||||||
Changed: | ||||||||
< < |
<IfModule mod_mime.c> | |||||||
> > |
| |||||||
# TWiki setup - avoid renaming scripts | ||||||||
Changed: | ||||||||
< < |
AddHandler cgi-script . </IfModule> | |||||||
> > |
AddHandler? cgi-script . ... | |||||||
Configuring TWiki | ||||||||
Line: 416 to 411 | ||||||||
4. Editing the Shebang lines | ||||||||
Changed: | ||||||||
< < |
Now to edit the curiously named 'shebang lines' at the top of the TWiki CGI scripts... | |||||||
> > |
Now to edit the curiously named 'shebang lines' at the top of the TWiki CGI scripts. This is required so the Apache server knows what interpreter (perl) to use with the scripts. | |||||||
| ||||||||
Line: 473 to 468 | ||||||||
6. Installing required Perl modules | ||||||||
Changed: | ||||||||
< < |
Some additional Perl modules are needed for the register script to work properly. Fortunately, there is an automated tool that makes it easy to do this - it's called cpan , and goes to the Perl module archive site, http://www.cpan.org/, to download all required modules, and then build and install them. Here's what you need to do:
| |||||||
> > |
Some additional Perl modules are needed, above and beyond the standard modules installed with Cygwin. Fortunately, there is an automated tool that makes it easy to do this - it's called cpan , and goes to the Perl module archive site, http://www.cpan.org/, to download all required modules, and then build and install them.
Note: if you are unable to get cpan working in your environment, don't panic; you can still install the modules manually. In this case, follow the instructions in CPAN: The Hard Way.
| |||||||
First of all, you need to get the cpan tool configured and working - this is only necessary once. From the Cygwin shell, type the following (putting the export command in ~/.profile is recommended to make this setting persistent). Without the TEMP variable, some modules may fail to install on Windows 2000 and higher.
$ export TEMP=/c/temp $ cpan | ||||||||
Added: | ||||||||
> > |
||||||||
Lots of questions about configuration and preferences - just hit Enter until you get to the questions about mirror sites, but answer the questions about FTP proxies etc if you are behind a proxy-based firewall. The CPAN tool will fetch a series of files, some quite large, as part of this setup process, so be patient... | ||||||||
Deleted: | ||||||||
< < |
||||||||
NOTE: If you are behind a non-proxy-based firewall that requires the use of passive FTP, the initial downloads of files using Net::FTP may appear to hang - just wait 5 or more minutes, however, and the CPAN tool should eventually hit on ncftpget , which is part of Cygwin and does work OK. If this doesn't work and you are behind a typical NAT-based firewall, try doing the following at the Cygwin shell before running cpan - this forces Net::FTP to use passive FTP, letting it get through such firewalls:
$ export FTP_PASSIVE=1 | ||||||||
Line: 521 to 517 | ||||||||
Changed: | ||||||||
< < |
Eventually, you'll get to the CPAN tool's shell prompt, where you need to install a few modules - the tool will do all the work for you. | |||||||
> > |
Eventually, you'll get to the cpan installer's shell prompt, where you need to install a few modules - the tool will do all the work for you.
| |||||||
| ||||||||
Line: 538 to 534 | ||||||||
Added: | ||||||||
> > |
CPAN: The Hard WayIf you find thatcpan doesn't work for you, perhaps because you are behind an uncooperative corporate firewall, you may have to fall back on installing modules manually. In this case, you need to read the CPAN INSTALL page and visit the CPAN search site to search for each module you require. Usually installation simply involves downloading the module distribution into a temporary directory and unpacking it (a .tar.gz or .tgz file is unpacked using tar zxvf file ). Then do the following:
$ perl Makefile.PL $ make $ make test $ make installThe make test step should not be skipped - for example, one known problem is with the Digest::SHA1 module on Windows NT, which does not pass its tests and does not work. This causes problems with password encoding. In this event you can use another encoding scheme or switch to unencoded passwords. There may be other problems on the various Windows configurations, and you can save yourself a lot of time.
| |||||||
Re-locking RCS files7. Re-locking files | ||||||||
Line: 584 to 590 | ||||||||
8. Email setup for notification and registration | ||||||||
Changed: | ||||||||
< < |
You need to set the SMTPMAILHOST in TWikiPreferences to an SMTP email host that is reachable and currently working. Otherwise you'll get a confusing message from TWiki when registering new users or running mailnotify (for WebNotify), along the lines of:
| |||||||
> > |
You need to set the SMTPMAILHOST in TWikiPreferences to an SMTP email host that is reachable and currently working. Otherwise you may get a confusing message from TWiki (fixed in TWiki:Codev.TWikiRelease01Feb2003) when registering new users or running mailnotify (for WebNotify), along the lines of:
| |||||||
Software Error: Can't call method "mail" on an undefined value at ../lib/TWiki/Net.pm line 187. | ||||||||
Line: 599 to 605 | ||||||||
Here are the main things to test:
| ||||||||
Added: | ||||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Line: 638 to 645 | ||||||||
You may want to investigate TWiki:Codev.WindowsInstallModNTLM, which describes how to add an Apache module so that TWiki:Codev.InternetExplorer users are automatically authenticated based on their Windows domain login - this avoids TWiki:Codev.GettingTheUsernameWrong and TWiki:Codev.ForgettingPasswords, which are usually very common among TWiki users. | ||||||||
Added: | ||||||||
> > |
As of the TWiki:Codev.TWikiRelease01Sep2004, there is built in support for several apache based authentication modes. The TWikiInstallationGuide has step-by-step instructions. | |||||||
Improved performanceSee TWiki:Codev.WindowsModPerlInstallCookbook and TWiki:Codev.ModPerl for information on installing TWiki under Apache'smod_perl - this is somewhat more complex and follows a different model, so it's best to get some experience with TWiki, Apache and Perl first.
| ||||||||
Line: 660 to 668 | ||||||||
People who've tested or reviewed this document and provided valuable feedback include: | ||||||||
Changed: | ||||||||
< < |
||||||||
> > |
-- TWiki:Main.BernardFarrell -- TWiki:Main.BerndSchiffer -- TWiki:Main.ChrisKeith -- TWiki:Main.CrawfordCurrie -- TWiki:Main.DavideBaroncelli -- TWiki:Main.DavidLeBlanc -- TWiki:Main.JerryWard -- TWiki:Main.MartinWittmann -- TWiki:Main.MaryDeMarco -- TWiki:Main.MattWilkie -- TWiki:Main.MikeBytnar -- TWiki:Main.PeterThoeny -- TWiki:Main.RossC -- TWiki:Main.TorbenGB -- TWiki:Main.VictorGoh -- TWiki:Main.WolframJahn | |||||||
Comments welcome at TWiki:Codev.WindowsInstallCookbookComments | ||||||||
Changed: | ||||||||
< < |
-- PeterThoeny - 30 Jan 2003 | |||||||
> > |
|