TWiki Personal - for developers
This is the developer's view of TWikiPersonal
: Not needed to install or run the personal TWiki, but relevant if you want to know how it is done or how to extend it. The initial discussion about this topic is available at PortableTWiki
, I'd like to avoid copying it.
Having a standalone TWiki application has enough uses to make me try creating one:
- Develop and test plugins or TWiki applications locally: On my development machine, I used to run TWiki on two or three virtual hosts in Apache. This is a pain with regard to keeping Apache and TWiki configuration in synch, and with regard to file ownership and permissions.
- Use TWiki as a personal information manager (PIM): I want to use TWiki because I'm familiar with it and because it has the features I want. I don't want to configure and run Apache for that, and I don't want to download, configure and run VMware player and a VM for that, especially when I am on Windows.
- Creating and presenting content with SlideShowPlugin when there's no friendly TWiki server near you, e.g. on a customer site without guest (W)LAN or in a hotel/train where WLAN might be available, but with inacceptable price, throughput, or both.
As already stated: TWiki-Personal is for personal use. It is assumed that one
person uses it on one
system. Most TWiki security mechanisms have been switched off. If other people are using the same system, you need to trust each other.
- Portable TWiki only responds to clients on the same system (technically: listens to localhost only).
- The configuration file
LocalSite.cfg is just a plaintext file on your local disc.
- If you intend to "open up" your Portable TWiki to others, please enable appropriate security mechanisms. They are available with
configure, just disabled per default.
TWiki-Personal is not only easy to use, it is also much easier to build than its predecessors. This is, of course, due to the fact that Perl has evolved since then. We have a packaging system to contain the Perl runtime (based on CPAN:PAR::Packer
), and a pure-perl webserver (CPAN:plackup
). So, if you can't wait until I've tested enough to provide the download, roll out your own:
In addition to the modules to run TWiki, you need to install the following modules and their dependencies:
Right now, building the personal distribution is done only with the help of a new tool in
There are just two commands to be run. For brevity, we assume that you have
and that you are in the base directory of a checkout - otherwise just adapt the paths.
- On the platform where you have your SVN checkout:
twikidev collect --manifest TWPDistrib/lib/MANIFEST --root core --destination /tmp/twiki-personal --clean
This command will collect (sic!) all files from core and from the default extensions to the destination path. The trick is in the special
MANIFEST file dedicated to this purpose. It contains TWiki's default distribution plus our own copy of
CGI.pm to safeguard against incompatible versions, and in particular the PSGIEngineContrib needed to run TWiki from a pure-perl webserver. In addition, there's a starter script
runPersonal.pl and an initial
LocalSite.cfg.orig. So, it is rather easy to bundle with a different set of extensions by just providing a modified
- Then, move the directory /tmp/twiki-personal to a location which is accessible by the target platform.
- On the target platform, run:
twikidev packtwp --root twiki-personal
--root is the directory you just created. This procedure packs all perl modules from your local installation and all TWiki modules to one CPAN:PAR archive. On Windows, the Perl executable will be packed as well; on Linux, we assume that you have Perl available, so the procedure will create just a Perl script.
instructions are here, for comparison, and for a rough description what the tool does:
- Start with a TWiki 6.0.1 distribution in the directory of your choice.
- Apply a Patch to the distribution. A few core changes could not be avoided, they will go into the next release.
- Don't configure TWiki using Apache or another web server.
- Install Plugins.PSGIEngineContrib into this TWiki.
- Start a console / terminal, change to the root directory of your TWiki.
- Create the executable:
pp --clean --addfile=lib --lib=lib --module=TWiki::Contrib::PSGIEngineContrib::PARLoader tools/runpsgi.pl
- You now have a file called
a.exe (on Windows) or
a.out (on Linux). Rename as you wish.
- You now can delete all files in the
lib directory with exception of
- Done! You are now ready to proceed with step 3 of the installation instructions.
-- Contributors: Harald Jörg
discovered that in version 6.0.2-alpha User Interface Internationalization doesn't work. I have created a new version 6.0.3-alpha, it is available for download from sourceforge here: https://sourceforge.net/projects/twiki/files/TWiki-Personal/TWiki-Personal-Win-6.0.3-alpha.zip/download
As always: Feedback is welcome!
-- Harald Jörg - 2016-08-20