Tags:
windows1Add my vote for this tag create new tag
, view all tags

TWiki 5.1.1 using IndigoPerl on Windows

NOTE: If you are planning to install the latest version of TWiki on Windows, check out TWikiOnWindows first. TWiki-specific installer bundles are now available, which are far more up-to-date (and easier to install) than IndigoPerl.

Here's how to install TWiki on a Windows machine using IndigoPerl. It has been used successfully on Windows XP SP3

Note: This cookbook describes an installation intended for use as a personal TWiki. As such it doesn't pays much attention to security; the install tacitly assumes that file permissions are not really an issue (if they are an issue for you, and you work out all the details, please update this guide accordingly).

Note2: The steps/content on this page were taken from IndigoPerlCookbook (along with TWiki04x02WindowsInstallationGuide) and updated to reflect the latest versions of Indigo Perl (9.02) and Twiki 5.1.1

This topic is a TWikiApplication. Enter your required paths, and hit "Rewrite the instructions using these paths" to tailor the instructions for your system.

I want to install IndigoPerl in this directory:
I want to install TWiki in this directory:
 

Notes on DOS paths:

  • For some configurations you may need to replace the normal Windows back-slash ("\") with a UNIX-style forward-slash ("/").
  • In some places, you may need to use DOS file paths rather than Windows long file names.
    Remove spaces from all paths!
    • Example: For the Windows path c:\Program Files\IndigoPerl , use c:\PROGRA~1\Indigo~1 .

Step 1: Installing IndigoPerl

  1. Create a directory called C:\IndigoPerl
  2. Download, unpack and install IndigoPerl to this directory, and restart Windows.
  3. When your machine restarts, click Start, click Control Panel, then click System.
  4. In the Systems Properties dialog, click the Advanced tab, then click Environment Variables.
  5. In the System Variables group, look for the variable labeled "Path" and make sure that it includes C:\IndigoPerl\perl\bin; in the variable listing. The IndigoPerl setup application should have added this line for you.
    1. If it was not added to your Path variable: Select "Path" then click Edit. At the beginning of the Variable Value box, type C:\IndigoPerl\perl\bin; and click OK.
      ChangePathEnvVar.gif
    2. Click OK, then click OK again.
CHECKPOINT You need to make sure that IndigoPerl is installed and running. Click Start, click Run, then type cmd (or command) and click OK. At the command prompt, type perl -v and press Enter. If perl runs and produces a sensible looking version number, then IndigoPerl is installed properly. Here's what you should see:
PerlVersionScreenCap.gif

Note: as of 2012, IndigoPerl has a separate download package which includes Apache & MySql etc as well as Perl. The steps above use the stand-alone Indigo Perl install. Apache will be installed separately in step 2.

Step 2 Installing Apache

  1. Install Apache.
    • ALERT! You must disable any running webservers (IIS) and close Skype during installation for Apache to install correctly.
    • At the time of this writing, Apache HTTP Server 2.2.22 (httpd) was used.
    • Use the default installation settings

Step 3: Installing TWiki

  1. Create a folder C:\www\twiki .
  2. Download the latest TWiki installation package.
  3. Unzip the TWiki package into the C:\www\twiki directory.

Edit Configuration Files

Apache Config

  1. Visit the TWiki.ApacheConfigGenerator page.
  2. Ensure you check the "mod_perl" option
  3. Follow the instructions to save the settings as twiki.conf to your apache conf directory.
  4. Comment out the line: PerlRequire C:\www\twiki/tools/mod_perl_startup.pl by putting a pound at the start (#), or delete the line altogethor. (mod_perl_statup.pl doesn't appear to be included with Twiki anymore)
  5. Replace the line
    PerlSwitches -T
    with
    PerlSwitches -T -IC:\www\twiki\bin -IC:\www\twiki\lib
  6. Open C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf and:
    1. At the end of the "LoadModule section, add these 2 lines to load mod_perl
      LoadFile C:\IndigoPerl\bin\perl510.dll
      LoadModule perl_module C:\IndigoPerl\bin\mod_perl.so
    2. Add the line Include conf/twiki.conf at the very end.
  7. Edit LocalLib.cfg and replace the line $twikiLibPath = "/absolute/path/to/your/lib"; by $twikiLibPath = "C:\www\twiki\lib";.
  8. Go to C:\www\twiki\bin and copy/rename LocalLib.cfg.txt to LocalLib.cfg.
  9. Move LocalLib.cfg to C:\www\twiki\lib. If you do not do this, TWiki's configure script will assume it is not there.
  10. Restart your Apache server using the service manager or the Apache tray icon.

Run rewriteshbang.pl

Note: Even though your Twiki.conf file explicityly states to use mod_perl for commonly executed perl scripts in the bin directory, not all of them are specified, so rewriting the shbang statement is still required (eg: configure & login scripts will still use the Perl interpreter... in fact, it is preferred that the Perl interpreter and not mod_perl be used for configure).

  1. Click Start then click Run. Type "cmd" (or "command") and click OK to open a DOS prompt.
  2. Type cd C:\www\twiki\bin and press Enter. Make sure this directory and all files within it are writable (not read-only). If not, the following script will fail.
  3. Type perl ../tools/rewriteshbang.pl and press Enter.
  4. When prompted Enter path to the interpreter, type C:\IndigoPerl\bin\perl.exe and press Enter. Then press Enter again to accept the path.
    • You will see that several files have been modified.
    • ALERT! Error Message Permission denied at ../tools/rewriteshbang.pl line 71 . Most likely, you did not have the path to the interpreter exactly correct. Please check it and try again.
  5. Go to C:\www\twiki\tools.
  6. Run perl rewriteshbang.pl.
  7. Specify C:\IndigoPerl\bin\perl.exe at the prompt and confirm.

Install Additonal Perl Modules

  1. At the command prompt, type ipm install Algorithm-Diff and press Enter. The module will be installed.
  2. At the command prompt, type ipm install CGI-Session and press Enter. The module will be installed.
  3. At the command prompt, type ipm install Error and press Enter. The module will be installed.
    • If ipm cannot install the modules: Make sure that you are not behind a web proxy or that your HTTP_PROXY Environment Variable is correct. If you are behind a proxy server: The HTTP_PROXY environment variable must be correctly set before running ipm. To do this, click Start, click Control Panels, then click System. Click the Advanced Tab, click Environment Variables. In the System Variables group, click New. In Variable Name type HTTP_PROXY and in Variable Value type "http://proxy-address:port" . Click OK, click OK, and click OK again. You may need to restart Windows for this change to take effect.
    • You may need additional modules. See Getting More Modules.

Configure Twiki

  1. Configure TWiki by opening your browser and going to http://localhost/do/configure
    • If you get an error when running configure: Double check your httpd.conf settings against the description above
    • If needed, check your permissions. The web server user has to be able to read all the files in C:\www\twiki\bin
    • If configure is complaining about not being able to find LocalSite.cfg, then don't worry if this is the first time you have run it. Just enter a new password and follow the steps.
    • If configure is still complaining about not being able to write LocalSite.cfg, then:
      • Check your permissions (if applicable)
      • Check that the LocalLib.cfg file has the correct path to the TWiki lib dir ( %TWIKIDIR/lib)
    • You should get 12 warnings in the General path settings section.
  2. Open the General path settings section.
  3. Fix the path containing backslashes ( \) by replacing them with Linux-like slash ( /).
  4. Fix any additional paths as required. eg: Set PubUrlPath to /twiki/pub
  5. Click the Next button.
  6. If needed, enter a new password, confirm and click Change Password and Save button.
  7. Follow the Return to configuration link.
    • Now you should get 52 errors in the Store Settings section, one warning in the Security Setup section, and one warning in the Mail and Proxies section.
  8. Click Store Settings.
  9. In the {StoreImpl} dropdown list, select RcsLite and click Next (at the bottom of the page). This will save your settings.
    RcsLiteSelected.gif
    • RcsLite is a pure-Perl implementation of RCS. If you are able to get RCS installed and working from the command-line, you can change the {StoreImpl} setting to use RcsWrap instead. RcsWrap is faster than RcsLite, but is otherwise identical (they use the same file formats). We recommend you stick to RcsLite unless you have a pressing need for RcsWrap (and the expertise to install it).
  10. Goto the Mail and Proxies section and provide your email address in the {WebMasterEmail} field. ( Note: SendMail setup coming soon).
  11. Search for the {RCS}{SearchAlgorithm} option in the Store settings section and select TWiki::Store::SearchAlgorithms::PurePerl (You may have to click "Yes I've read all the documentation" to be able to see this setting).
  12. Click the Next button, provide your password and save.
  13. Follow the Go to the TWiki front page link.
  • CHECKPOINT You should now be able to visit http://localhost/do/view/Sandbox/DoIWork, create the topic and save it. The files C:\www\twiki\data\Sandbox\DoIWork.txt and C:\www\twiki\data\Sandbox\DoIWork.txt,v should now exist.

-- Contributors: TroyChard - 2012-04-25, CrawfordCurrie, SamHasler, RalfLimmer, BrankoBange, PengfeiChen, AdamCarr, ForrestChristian, TorHovland, JanPerticai, KenLockhart, EnriqueCadalso, BrandonTeoh

Discussion

I decided to create a new page for this topic. Not sure if that was the right thing to do, but it seems like there's still useful info on the old IndigoPerlCookbook page (like using Gnu Grep, or getting TWiki from SVN (even though that info might be dated).

If this was a bad idea and you guys think it better to update the old page, just let me know and I'll do that instead.

btw, this was the breakthrough to fix setlib.cfg problems
PerlSwitches -T -IC:\www\twiki\bin -IC:\www\twiki\lib big grin

-- TroyChard - 2012-04-25

For those who can get to the configuration page, but not the home page, check the LocalLib.cfg, LocalSite.cfg, and setLib.cfg files. In setLib.cfg, change "../lib" to the absolute path.

I then got template errors, so I had to go to LocalSite.cfg and make sure the TemplatePath, not TemplateDir, wan't corrupted e.g. for me "c:/www/twiki/templates" instead of "c:/www/wiki/templates"

-- KyleSweeney - 2012-06-25

Kyle, the twiki/bin/setlib.cfg should not be touched, it gets overwritten on upgrade. You can define the absolute path in twiki/bin/LocalLib.cfg.

-- PeterThoeny - 2012-07-01

PLEASE NOTE THAT THIS TOPIC IS NOT THE RIGHT PLACE TO ASK INSTALL QUESTIONS. USE Support web FOR THAT, GIVING FULL DETAILS FOR WHAT YOU WERE TRYING TO DO.
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2012-07-01 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.