Tags: , , ,


Once the number of installations becomes greater than one, I have to face two problems:

  • repeat the installation process
  • keep each installation up-to-date

As an adminstrator I try to avoid this situation whereever possible. Recently my degree of suffering under mediawiki installations was too high and I wrote a little script, which helps me a bit. For one it creates a new installation with sym-linking to the root installation. The root installation is managed by a package management system and thus is kept up-to-date. Second of all, the installation is partly automized, so no more need for manual linking, changing ownership and moving of files.

If you are interested, more details are given by the script itself:

  1. Usage: create-mediawiki-copy.sh OPTIONS [TARGET-DIRECTORY]
  2.  
  3. Hi! I will create a new, sym-linked wiki instance, linked to the
  4. root installation. Thus only the root installation must be updated.
  5.  
  6. The entire setup procedure is done in 3 steps, whereas each step can
  7. be done individually.
  8.  1. create local copy in [TARGET-DIRECTORY]
  9.  2. configure Wiki and database through the browser (not done by this script!)
  10.  3. cleanup installation (i.e. copy config to correct location)
  11. Step 1 and 3 are performed by default.
  12.  
  13. Options
  14.   -i   install new wiki
  15.   -c   cleanup installation after configuration
  16.   -b   do both, install and cleanup; wait in between for user input
  17.   -u [USER]  user  new installation belongs to
  18.   -g [GROUP] group new installation belongs to
  19.  
  20. During this process I need to change the ownership of some files, so you
  21. will need to call me with root permission (or have the required right youself).
  22.  
  23. The location of the root installation and directories which should be copied
  24. and not linked, are configured in this very script. You will have to edit it
  25. to change these values.

If you are interested, you can download the script here:
create-mediawiki-copy.sh.tar.gz

My work was inspired mainly by these two pages