Plugin Installer
Here is guide on how to download and install plugins and extensions onto a Linux machine.
Installer script
The script proposed here first download the requested plug-in before unzipping it into the specified TWiki installation directory.
The installer script leaves the plug-in's zip file in the current directory.
Just save the following code in file called
instplugin.pl for instance.
#!/usr/bin/perl
use strict;
use warnings;
my $pluginName=$ARGV[0];
my $twikiDir=$ARGV[1];
`wget http://twiki.org/cgi-bin/viewfile/Plugins/$pluginName?filename=$pluginName.zip`;
`mv $pluginName\?filename\=$pluginName.zip $pluginName.zip`;
`unzip $pluginName.zip -d $twikiDir`;
Usage
instplugin.pl <PluginName> <twiki/installation/directory>
The installer script takes 2 parameters:
- PluginName: TWiki plugin name
- twiki/installation/directory: TWiki install directory
Example
./instplugin.pl UsageExamplePlugin /srv/www/twiki
Step by step
- Run the installer script from your download directory as the zip file(s) will be left in the current directory.
- Fix the access right as described in SettingFileAccessRightsLinuxUnix.
- Enable the newly installed plugin(s) in
configure.
- Done!
--
Contributor: StephaneLenclud - 15 Jan 2007
Discussion
Thanks Stephane for sharing this.
FYI, the configure script of the upcoming
TWikiRelease04x01x00 can install plugins. Your way of installing plugins from the command line is safer since the lib and bin dirs do not need to be writable by the webserver user (as is the case with the configure script based installer.)
--
PeterThoeny - 15 Jan 2007
The plugin files access rights and group memberships should be set also by this script. Downloading and unzipping is not the tedious part of installation... finding all the files and correcting the access settings is. It happens to me all the time that I omit to change, say, the group ownership of a file and suddenly the plugin does not work because the apache process cannot read a file essential for the plugin...
--
ThomasWeigert - 15 Jan 2007
Thomas: That's right I'll put together an improved script including
SettingFileAccessRightsLinuxUnix when I get a chance.
Peter: I'm looking forward for that new 4.1 feature. Just how insecure is that? Can I read more about it somewhere?
--
StephaneLenclud - 15 Jan 2007
I am not aware of any collaboration that was going on in the Codev web on the plugins installer; the existing
Codev.PluginsInstaller and
Codev.ImprovePluginsInstaller are outdated. I left a note in
PluginsInstaller.
--
PeterThoeny - 16 Jan 2007