[Pkg-mediawiki-devel] Multi-Instance script for MediaWiki

Dominik George nik at naturalnet.de
Tue Apr 3 01:37:25 UTC 2012

Hash: SHA1

Hi MediaWiki maintainers,

during a help thread on a local Debian forum, I ahve put together a
simple, but cool script that allows for the automated management and
update of multiple MediaWiki instances.

The idea is that, with the MediaWiki instance from the mediawiki package
residing in /var/lib/mediawiki with symlinks to /usr/share, there is no
(obvious) way of multiplying it and still having it properly updated by

Of course, it is very easy to copy it and create several instances while
still symlinking to /usr/share/mediawiki, but this becomes a mess when
running a large-scale install and i nthe worst case, something changes
in /var/lib/mediawiki.

The attached script is capable of

- - creating a config in /etc/mediawiki/multiinstance.conf
- - Adding and deleting instances below a parent directory
- - Updating these instances from the "template" in /var/lib/mediawiki
- - Manage and properly symlink seperate MediaWiki configs in

An exampel isntallation looks like this:

# apt-get install mediawiki
# mediawiki-multiinstance add wiki1
Configuration for this script does not exist. Creating!
Where do you want to keep your wiki instances? [/var/www/wikis]
Where does the template isntance reside? [/var/lib/mediawiki]
Wrote /etc/mediawiki/multiinstance.conf.
Wiki root and configspace created. Now run the installtool, then
run mediawiki-multiinstance config wiki1!
# links http://localhost/wikis/wiki1
  # Run installtool for this instance
# mediawiki-multiinstance config wiki1
Do you really want to copy new config for wiki wiki1? If so, type YES: YES
Config for wiki wiki1 updated from installtool output.
# mediawiki-multiinstance apache >/etc/mediawiki/apache.conf
  # Outputs an Apache config snippet for the wiki space

This can be repeated for as many wikis as the user desires (of yourse,
the initial config questions are not asked again).

In the case that a package update comes in, the following command takes
care of updating the wikis:

# mediawiki-multiinstance update

Of course, the script has to undergo many improvements. What I want to
know is if there is interest to include it in the mediawiki package for
shipping with Debian.

It could, in the best case, be called from the postinst script as

test -f /etc/mediawiki/multiinstance.conf &&

to update the users' Wiki spaces, but only if multiinstance is configured.

The script can also be found at
http://shore.naturalnet.de/~nik/mediawiki-multiinstance .

Any thoughts/feedback ;)?


- -- 
PGP-Fingerprint: 8BC7 ABAB C2F2 4D5E 24FC
                 FC1C DB0E A4BC E210 7412

Please contact me for a face-to-face meeting
if you wish to exchange signatures with me.

Signature Policy: https://www.dominik-george.de/gpg-policy.txt.asc
Public key:       https://www.dominik-george.de/gpg.asc

X.509 certificate fingerprint for key download:

FYI, I cannot read HTML mail. Really, I can't. Claws doesn't
implement it.
Version: GnuPG v2.0.18 (GNU/Linux)

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mediawiki-multiinstance
URL: <http://lists.alioth.debian.org/pipermail/pkg-mediawiki-devel/attachments/20120403/063dcaac/attachment-0001.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mediawiki-multiinstance.sig
Type: application/pgp-signature
Size: 465 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-mediawiki-devel/attachments/20120403/063dcaac/attachment-0001.pgp>

More information about the Pkg-mediawiki-devel mailing list