Tags:
create new tag
, view all tags

TWiki 4.2 Installation on OpenVMS

This is update 1 of the first draft at installing TWiki on OpenVMS.

As of this writing this has not been thorougly tested. I can log in, edit pages, upload and delete attachements and modify the configuration. I now have reports of two additional sites starting to use Twiki on OpenVMS.

I have not intentionally tested the default plugins or with additional CPAN modules beyond what HP provides.

Perequisites (or what I used)

  • OpenVMS 8.3
  • Apache - CPQ Secure Web Server V2.1-1 + CPQ CSWS211_UPDATE V1.0
  • mod_perl - CPQ PERL V5.8-6 + CPQ PERL586_UPDATE V1.0
  • perl - CPQ CSWS_PERL V2.1 + CPQ CSWS_PERL21_UPDATE V1.0
  • unzip - unzip 5.40

Apache, mod_perl, perl, and unzip are all available from download from HP at http://www.hp.com/go/openvms under their open source and freeware links.

ODS-5 appears to be a requirement as some of the path names exceed the character limits of 39.39 for ODS-2 volume. The current INFO-ZIP archiver was not able to archive several of the filenames to repackage an archive.

Installation requirements

At this writing there is not a pre-patched kit for Twiki available for VMS, and the patches here are for the 4.2 kit.

A ZIP archive containing just the patches has been attached to this document for your convenience.

Recommended installation:

Note that there is nothing special about the directories and accounts used, so experts can substitute as desired.

Create a directory on a preferably ODS-5 volume named TWiki_root owned by the same user as Apache: APACHE$WWW.

$ CREATE/DIR DISK$BIGDISK:[TWiki_root]/owner=APACHE$WWW

Setup a concealed rooted logical name in the SYSTEM/EXEC table through the SYS$MANAGER:SYLOGICALS.COM file to reference that directory:

$ DEFINE/SYSTEM/EXEC/TRANS=CONC twiki_root DISK$BIGDISK:[TWiki_root.]

Run that command file to make sure that the definition is present.

Create the base directory TWIKI_ROOT:[TWiki]

Download the http://twiki.org/p/pub/Codev/Release/TWiki-4.2.0.zip release and unzip it into the TWIKI_ROOT:[TWiki] directory. Use the "-X" parameter to restore the file permissions.

Note that files with multiple dots in them will have the extra dots in them converted to '_' characters. Perl 5.8.6 expects this conversion.

The following modules will need to be patched or edited. Read this and the official TWiki installation documents for configuring Twiki.

Good luck. -John

Installation notes from a consultant installing a new Twiki on OpenVMS site:

NOTE: if something fails during configure and you get an Apache Internal Server Error, just try to re-load the page or use the browser BACK button and re-submit the previous page - this seems to work most of the time !

NOTE: need to shutdown and start APACHE after any serious error running Configure, because mod_perl remembers things between runs !

This is due to issues with the mod_perl on OpenVMS, and that the Configure program is not designed to be run under mod_perl. OpenVMS effectively requires mod_perl to run perl CGI scripts under Apache at this time.

  • For troubleshooting look into APACHE$ROOT:[LOGS]ERROR_LOG. or twiki_root:<twiki.data>warn*.txt (*=yyyymm)

  • To include the TWiki Apache config file (twiki_sample_vms.conf), copy that file to APACHE$ROOT:[CONF] and add the following line to the bottom of APACHE$ROOT:[CONF]HTTPD.CONF

Include /apache$root/conf/twiki_sample_vms.conf

I would recommend renaming the conf file. Note that this is different than on the Linux implementations that I use where Apache scans a directory on startup.

  • AuthOpenVMSUser on in twiki_sample_vms.conf requires the mod_auth_openvms.exe module to be loaded. Add the following line to APACHE$ROOT:[CONF]HTTPD.CONF:

LoadModule auth_openvms_module /apache$common/modules/mod_auth_openvms.exe

  • When running configure, the following error may be reported:

      Software error:
       Can't locate object method "splitdirs" via package "File::Spec" at
        /twiki_root/twiki/lib/TWiki/Configure/Checker.pm line 67

This causes the admin to be unable to continue configure and set the 'General Path Settings'.

Changing 'splitdirs' to 'splitdir' in Checker.pm fixed that problem and allows the main configure page to display correctly.

  • When running configure and there is an error regarding a missing error.pm module, you may need to temporarily copy error.pm from twiki_root:[twiki.lib.cpan.lib] to twiki_root:[twiki.lib] before re-trying to run configure. The [twiki.lib]error.pm file should be deleted, once configure has been run successfully.

  • DCL-W-IVVERB error message during SAVE

When trying to save a page and you receive a message similar to this:

      RCS: /usr/bin/rlog  -h &#37;FILENAME&#124;F&#37; of /twiki&#95;root/twiki/data/Sandbox/TestTopic0.txt-v failed: &#37;
            DCL-W-IVVERB, unrecognized command verb - check validity and spelling \$\

you need to add the following line to twiki_root:<twiki.lib>localsite.cfg:

$TWiki::cfg{WarningsAreErrors} = $FALSE;

OpenVMS requirements for locally maintained configuration files

apache$root:[conf]twiki.conf

I took the standard template and hacked at it until it worked.

I am still learning Apache on OpenVMS management, so this and the and the .htaccess could probably both use improvement.

I restricted the configure script to SYSTEM using VMS authentication.

bin/.htaccess

I did a lot of hacking on this, and since my TWiki is on an intranet for home use, my security settings may not be optimal. This is my first working with .htaccess files.

In many cases things are commented out because Apache complained that they could not be specified at that point in the .htaccess file.

Also, on VMS by default the Apache web server runs with normal user privileges.

bin/locallib.cfg

This was generated by the configure procedure. Note directory paths must be in Unix syntax.

lib/localsite.cfg

As running the configure.pl script under mod-perl has problems, you may wish to manually modify this file instead.

You must use the configure.pl script to set or reset the TWiki Admin password and username.

All directory paths should be in Unix syntax.

Note changing the TWiki admin username requires generating a new TWiki Admin password.

Also note that changing the login prompt for general TWiki logins will invalidate all stored passwords including the admin password.

These values are important for VMS:

  • With the default MOD_PERL / PERL installation from HP, md5 is the only encryption method that TWiki supports.

$TWiki::cfg{Htpasswd}{Encoding} = 'md5';

  • RCS is not likely to be available on VMS system. correction

$TWiki::cfg{StoreImpl} = 'RcsLite';

  • No fork, so need to use Pure Perl for searching

$TWiki::cfg{RCS}{SearchAlgorithm} = 'Twiki::Store::SearchAlgorithms::PurePerl'

  • Make sure that you have senderhost configured to where your VMS system can send e-mail.

$TWiki::cfg{SMTP}{SENDERHOST} = 'localhost';

  • By default the HP PERL/VMS does not include the modules needed for these plugins.

$TWiki::cfg{Plugins}{TinyMCEPlugin}{Enabled} = 0;

$TWiki::cfg{Plugins}{WysiwygPlugin}{Enabled} = 0;

Files needing patching

bin/configure

On VMS, I was only able to get it to run under mod-perl, and it would tend to crash with warnings related to being run under mod-perl, where I needed to hit the back button and retry the commit operation.

So I only use it to set the admin password and display the existing configuration.

Configure needs some changes to run on VMS.

getgid() is not working for HP Perl/VMS so we need to issue a call DCL return that information. This also means that we can not set tainting due to an issue in Perl on VMS. There are two places this mod is needed.

FindBin is not working on the HP Perl/VMS.

File::Spec::splitdir() only works on directories, no volumes or filenames can be in the input, splitpath() should be used to extract the filename. File::Spec->catpath is needed because there could be a volume specification.

A substitution listed for Win XP does not work on VMS.

bin/attach
bin/changes
bin/edit
bin/login
bin/logon
bin/manage
bin/oops
bin/preview
bin/rdiff
bin/rdiffauth
bin/register
bin/rename
bin/resetpasswd
bin/rest
bin/save
bin/search
bin/statistics
bin/upload
bin/view

Mod_perl on OpenVMS is requiring the tainting to be set in Apache twiki.conf, and not in the shebang line.

Mod_perl on OpenVMS is cleaning up the required modules, but not the %INC array, so this is preventing the modules from being loaded. So on OpenVMS we have to remove the setlib.cfg hash member.

lib/TWiki/Configure/UIS/FINDEXTENSIONS.pm
lib/TWiki/Configure/UIS/EXTENSIONS.pm
lib/TWiki/Configure/UIS/AUTH.pm

File::Spec::splitdir() only works on directories, no volumes or filenames can be in the input, splitpath() should be used to extract the filename.

A substitution listed for Win XP does not work on VMS.

lib/TWiki/Configure/Checkers/CGISetup.pm

File::Spec::splitdir() only works on directories, no volumes or filenames can be in the input, splitpath() should be used to extract the filename. And catpath() is used to put the results of splitpath() back together.

lib/TWiki/Configure/UI.pm

FindBin is not working on the HP Perl/VMS.

File::Spec::splitdir() only works on directories, no volumes or filenames can be in the input, splitpath() should be used to extract the filename. File::Spec->catpath is needed because there could be a volume specification.

VMS crypt in perl currently only works in VMS specific scripts running with privilege. Digest::MD5 is the only common encryption found with the HP Perl/VMS and TWiki.

lib/TWiki/Configure/Checker.pm

FindBin is not working on the HP Perl/VMS.

File::Spec::splitdir() only works on directories, no volumes or filenames can be in the input, splitpath() should be used to extract the filename. File::Spec->catpath is needed because there could be a volume specification.

My patch introduces a bug on line 67, it should be File::Spec->splitdir not splitdirs. For some reason this error did not affect my installation, but did impact the second installation on VMS.

lib/TWiki/Users/BaseUserMapping.pm

VMS crypt in perl currently only works in VMS specific scripts running with privilege. Digest::MD5 is the only common encryption found with the HP Perl/VMS and TWiki.

lib/TWiki/Configure/UIS/FINDEXTENSIONS.pm
lib/TWiki/Configure/UIS/EXTENSIONS.pm
lib/TWiki/Configure/UIS/AUTH.pm

File::Spec::splitdir() only works on directories, no volumes or filenames can be in the input, splitpath() should be used to extract the filename.

A substitution listed for Win XP does not work on VMS.

lib/TWiki/UI/Upload.pm

VMS stat in perl returns 0 for the size of a file open for write until the file is flushed or closed.

lib/TWiki/Store/RcsFile.pm

The HP Perl/VMS for running MOD-PERL does not currently support the extended character set. So the old file extension of ",v" will not work. Use "-v" instead.

lib/TWiki/Sandbox.pm

Need to convert the path to VMS format so that the File::Spec routines work. Also need to use File::Spec->curdir and updir.

File::Spec->catdir creating a relative file specification from what started as an absolute file specification.

lib/CPAN/lib/CGI/Session/Driver/file.pm

VMS does not have flock, but by default locks files for exclusive write access, so flock is not needed.

bin/setlib.cfg

Need to use the File::Spec routines so that abs_path produces the right answer on VMS.

index.html

Bad link to the release notes.

-- Contributors: JohnMalmberg - 05 Jul 2008

Discussion

re: "no fork, so need to use Pure Perl for searching" - NativeSearch is a viable alternative that should deliver much higher performance than pure perl.

-- CrawfordCurrie - 06 Jul 2008

  • bin.patch: Patches for bin/* excluding configure

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatpatch bin.patch r1 manage 14.6 K 2008-07-05 - 20:05 JohnMalmberg Patches for bin/* excluding configure
Unknown file formatpatch configure.patch r1 manage 10.9 K 2008-07-05 - 20:07 JohnMalmberg Patches needed to get configure working on VMS
Unknown file formatpatch index_html.patch r1 manage 0.7 K 2008-07-05 - 20:09 JohnMalmberg Patch to correct the link to the release notes.
Unknown file formatpatch lib_cpan_lib_cgi_session_driver_file_pm.patch r1 manage 0.6 K 2008-07-05 - 20:13 JohnMalmberg VMS patch to operate with out flock
Unknown file formatpatch lib_twiki_sandbox_pm.patch r1 manage 1.5 K 2008-07-05 - 20:15 JohnMalmberg Patch for sandbox.pm on VMS
Unknown file formatpatch lib_twiki_store_rcsfile_pm.patch r1 manage 2.4 K 2008-07-05 - 20:16 JohnMalmberg VMS needs a different extension for RCS files
Unknown file formatpatch lib_twiki_ui_upload_pm.patch r1 manage 0.6 K 2008-07-05 - 20:18 JohnMalmberg stat() on VMS can not get the size of an open filehandle
Compressed Zip archivezip twiki-4_2_0_vms_patch_1.zip r1 manage 81.3 K 2008-07-05 - 21:59 JohnMalmberg ZIP archive of the patched files for VMS.
Unknown file formatconf twiki_sample_vms.conf r1 manage 8.3 K 2008-07-05 - 19:39 JohnMalmberg Sample twiki.conf file for Apache on OpenVMS
Texttxt vms_sample_bin__htaccess.txt r1 manage 5.1 K 2008-07-05 - 19:40 JohnMalmberg Sample [.bin].htaccess file for VMS
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2008-08-17 - VolkerHalle
 
  • 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.