Installation of TWiki4 on 1and1 Shared Hosting (Linux)

Pre-Requisites

Install TWiki Files

Configure TWiki Installation

TODO Set Up Login Sessions

TODO Install Perl Modules For TWiki

OLD-DO-NOT-USE BryceSchober Installation Steps

  1. Unzip TWiki-4.0.4.tgz to TWiki-4.0.4
  2. Unzip contents of hotfix-4.0.4-2.tgz over TWiki-4.0.4
  3. Rename TWiki-4.0.4 to TWiki-4.0.4-patched
  4. Execute (cygwin) "tar -cjf twiki-4.0.4-patched.tar.bz2 Twiki-4.0.4-patched"
  5. Copy twiki-4.0.4-patched.tar.bz2 to remote root
  6. Execute (remote) "tar -xjf twiki-4.0.4-patched.tar.bz2"
  7. Rename remote /Twiki-4.0.4-patched to /twiki
  8. Read http://[your_domain]/twiki/INSTALL.html
  9. Read http://twiki.org/cgi-bin/view/TWiki/SettingFileAccessRightsLinuxUnix?
  10. Remote "cd twiki"
  11. Paste script into remote console:

    find . -type d -print -exec chmod -v 755 {} \;
    find data -name '*.txt' -type f -exec chmod -v 660 {} \;
    find data pub -name '*,v' -type f -exec chmod -v 440 {} \;
    find lib -name '*.pm' -type f -exec chmod -v 440 {} \;
    find locale -type f -exec chmod -v 440 {} \;
    find pub -type f -exec chmod -v 660 {} \;
    find pub/TWiki/WysiwygPlugin/_kupu -type f -exec chmod -v 440 {} \;
    find bin -type f -exec chmod -v 550 {} \;
    find bin/logos -type f -exec chmod -v 440 {} \;
    find templates -type f -exec chmod -v 440 {} \;
    find tools -type f -exec chmod -v 550 {} \;
    chmod -v 660 lib/LocalSite.cfg
     chmod -v 660 data/.htpasswd
     chmod -v 660 data/mime.types
     chmod -v 440 bin/LocalLib.cfg.txt
     chmod -v 440 bin/.htaccess.txt
     chmod -v 440 pub/_work_areas/.htaccess
     chmod -v 440 pub/_work_areas/README 
    chmod -v 440 AUTHORS COPYING COPYRIGHT index.html INSTALL.html LICENSE pub-htaccess.txt readme.txt robots.txt root-htaccess.txt subdir-htaccess.txt TWikiHistory.html twiki_httpd_conf.txt TWikiReleaseNotes04x00.html 
    chmod -v 550 UpgradeTwiki
    
  12. cd ..
  13. Remote "tar -cjf twiki-20060906-step13.tar.bz2 twiki"
  14. rename /twiki/bin/.htaccess.txt to /twiki/bin/.htaccess - NOTE: Don't do this, see step 29.
  15. rename /twiki/bin/LocalLib.cfg.txt to /twiki/bin/LocalLib.cfg
  16. rename all files in /twiki/bin with no extension, adding .pl extension
  17. Remote "tar -cjf twiki-20060906-step17.tar.bz2 twiki"
  18. Download twiki-20060906-step17.tar.bz2 to local root and extract to twiki-20060906-step17
  19. Modify twiki-20060906-step17/twiki/bin/LocalLib.cfg, $twikiLibPath variable to "//htdocs/twiki/lib"
  20. Modify first "shebang" line of all .pl files in twiki-20060906-step17/twiki/bin to "#!/usr/bin/perl"
  21. Execute (cygwin) "tar -cjf twiki-20060906-step21.tar.bz2 twiki" in twiki-20060906-step17/
  22. Move twiki-20060906-step21.tar.bz2 to local root
  23. Copy twiki-20060906-step21.tar.bz2 to remote root
  24. Execute (remote) "tar -xjf twiki-20060906-step21.tar.bz2"
  25. Modify local twiki-20060906-step17/twiki/root-htaccess.txt , replacing line 13 with:

    Redirect /twiki/index.html http://[your_domain]/twiki/bin/view.pl/
    
  26. Modify local twiki-20060906-step17/twiki/root-htaccess.txt , inserting following text at line 3:

    <Limit GET POST>
    order deny,allow
     deny from all
     allow from [allowed_ip_1]
    allow from [allowed_ip_1]
    </Limit>
    
  27. Rename twiki-20060906-step17/twiki/root-htaccess.txt to twiki-20060906-step17/twiki/.htaccess
  28. Upload local twiki-20060906-step17/twiki/.htaccess to remote twiki/.htaccess
  29. Rename /twiki/bin/.htaccess back to /twiki/bin/.htaccess.txt - apparently I wan't supposed to do that!
  30. View http://[your_domain]/twiki/bin/configure.pl
  31. View General Path Settings - changed nothing
  32. Click Next - as per advice in General Path Settings
  33. Set password to [your_password]
  34. Return to configuration
  35. View General Path Settings
  36. Changed {PubDir}, {TemplateDir}, {DataDir}, and {LocalesDir}, removing extraneous "bin/configure.pl" from middle of path string.
  37. Save settings, return to configuration
  38. Changed GenPathSet? ->{ScriptSuffix} to .pl
  39. Save settings, return to configuration
  40. Changed MiscSet? ->{ReplaceIfEditedAgainWithin} to 0 - NOTE: This ensures that every page save generates a revision
  41. Save settings, return to configuration
  42. Created twiki@.com account, username: [your_twiki_email_user] pwd: [your_twiki_email_password]
  43. Changed Mail->{SMTP}{MAILHOST} to "smtp.1and1.com"
  44. Changed Mail->{SMTP}{SENDERHOST} to "twiki@[your_domain]"
  45. Changed Mail->{SMTP}{Username} to "[your_twiki_email_user]"
  46. Changed Mail->{SMTP}{Password} to "[your_twiki_email_password]"
  47. Save settings, return to configuration
  48. Downloaded http://search.cpan.org/CPAN/authors/id/M/MA/MARKSTOS/CGI-Session-4.14.tar.gz archive for CGI::Session via http://search.cpan.org/search?query=CGI%3A%3ASession&mode=all , extracted to local root /CPAN_lib
  49. Downloaded http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/Scalar-List-Utils-1.18.tar.gz archive for Scalar::Util via http://search.cpan.org/search?query=scalar%3A%3Autil&mode=all , extracted to local root /CPAN_lib
  50. Uploaded contents of local CPAN_lib\CGI-Session-4.14\lib directory to remote /twiki/lib/CPAN/lib/
  51. Uploaded contents of local CPAN_lib\Scalar-List-Utils-1.18\lib directory to remote /twiki/lib/CPAN/lib/
  52. First successful view of http://[your_domain]/twiki/
  53. Deleted twiki-20060906-step12.tar.bz2 and TWiki-4.0.4.tar that were mistakenly in remote /twiki - not sure exactly how
  54. Remote "tar -cjf twiki-20060906-step54.tar.bz2 twiki"
  55. Set Security->{UseClientSessions} on (was already)
  56. Set Security->{Sessions}{UseIPMatching} on (was already)
  57. Changed Security->{LoginManager} to "Twiki::Client::TemplateLogin"
  58. Set Security->{PasswordManager} to "Twiki::Users::HtPasswdUser" (was already)
  59. Changed Security->{MinPasswordLength} to 6
  60. Save settings, return to configuration
  61. View http://[your_domain]/twiki/ with login / register in sidebar
  62. Registered user Main.[your_twiki_user_name]
  63. Received "click to complete" email, confirmed, received confirmation email.
  64. Logged in successfully.
  65. Uploaded ".changes", "TestHTMLImport1.txt", and "TestHTMLImport1.txt,v" files from old to new twiki/data/Sandbox
  66. Viewed http://[your_domain]/twiki/bin/view.pl/Sandbox/TestHTMLImport1 successfully.
  67. Remote "tar -cjf twiki-20060906-step67.tar.bz2 twiki"
  68. Made sure all twiki-*.bz2 archives were in local root
  69. Deleted all twiki-*.bz2 archives and old twiki-something directories

-- Contributors: BryceSchober - 10 Jan 2007

Discussion

Thanks Bryce - this is a great help. Have you tried using the .htaccess templates for the pub and bin folders? Apparently TWiki is quite unsecure without them. I tried using them, but had some problems:

The pub/.htaccess includes a line "php_flag engine off" which breaks the rendering of my TWiki (even though I do have PHP 4 and 5 installed as the comments suggest are necessary for this line).

I also have a problem after creating the bin/.htaccess - the configure.pl becomes inaccessible (pops up a login box, but doesn't accept the login details that work on my site), even though I have edited the .htaccess settings to include my IP address and username.

Both issues are not completely cut and dried yet, so could still use some ideas. Of course, these lines can be commented out for now, which still leaves quite a few positive improvements (see my next comment), but for full security, they should be used.

-- EricWoods? - 04 Feb 2007

I've noticed that the bin/.htaccess file includes the following lines:
# Use CGI & Perl to handle all files in 'bin' directory, i.e. run as scripts
# - this should remove the need to rename files to end in '.pl' etc,
# if your web hosting provider permits this.  Remove if using mod_perl.
SetHandler cgi-script
which mean that you don't have to rename all the files in the bin directory with the .pl extension (I have tried it and it works). So it might be easier to tell people to enable this .htaccess file than it is to get them to 1) rename the files to .pl 2) add the .pl extension to configure 3) change the twiki/.htaccess redirect to go to view.pl... 4) edit about 2 to 4 other settings where it refers to view or register etc.

However, enabling the bin/.htaccess file outright will create more challenges for newbies, as there are quite a few things in there to configure. So maybe just tell them to copy the .htaccess from the parent directory, delete of its contents and just add the line "SetHandler cgi-script"...

-- EricWoods? - 04 Feb 2007

I like your suggestions. While you're collaborating on this, check out HowToInstallCpanModules? . I used it to get 4.1 mostly working - but I point it out not for that, but for its method of customizing instructions. That kind of thing could make these directions much easier to follow.

-- BryceSchober - 05 Feb 2007

Cool. I'll check it out after I have sorted out those issues and have something defininte to contirbute. Thanks.

-- EricWoods? - 04 Feb 2007

Hi, works with 4.2.0 thanks!

-- GustavoE? - 13 Jul 2008

I've been able to get foswiki running on 1and1, but I haven't had any luck with editing the wiki. I imagine this is a permission issue on the hosted service, but the error message garbled and I haven't been able to find any clear direction on how to get around this problem. When I try to save any edits I get the following message:

"Error saving topic During save of Main an error was found by the version control system. Please notify your Foswiki administrator.

/usr/bin/ci -m%COMMENT|U% -t-none -w%USERNAME|S% -u %FILENAME|F% of .../Main/WebHome.txt failed:

Go back in your browser and save your changes locally. "

I can't go back and change it locally. This is getting pretty frustrating as I've read different articles from twiki and foswiki and none of the permission settings seem to be valid. Any advice at this point would be greatly appreciated.

-- DanSupinski - 26 Oct 2009
 

BasicForm edit
TopicClassification AdminTopic
Topic Summary
Extension
Interested Parties
Related Topics SharedHosting

This topic: Support > FoswikiOnWebHost1and1
Topic revision: 15 Mar 2012, PaulHarvey
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