Difference between revisions of "Mediawiki installation"

From Biowikifarm Metawiki
Jump to: navigation, search
(Email)
(Email)
Line 131: Line 131:
  
 
Update 2017: We use PEAR (must be installed, see mediawiki manual), and had to use the following, slightly more complex install (probably due to updating rather than fresh install):
 
Update 2017: We use PEAR (must be installed, see mediawiki manual), and had to use the following, slightly more complex install (probably due to updating rather than fresh install):
  sudo pear channel-update pear.php.net; sudo pear uninstall mail pear/Auth_SASL net_smtp
+
  sudo pear channel-update pear.php.net; sudo pear install mail pear/Auth_SASL net_smtp
  
 
==Cloning a new wiki==
 
==Cloning a new wiki==

Revision as of 23:05, 2 January 2018

Todo SemanticFormsInputs

An overview and record of strategies to install mediawiki the first time, and maintain and upgrade it. See also:


First time MediaWiki installation

Basics: We want to run multiple mediawiki instances from a single software source. Our preferred method uses a mixture of local files in a var/www subfolder (LocalSettings.php, the config and image folder) with the rest of mediawiki files and folders being represented by symbolic links (largely following these instructions; see for a page probably equivalent to our method but not used by us). We use "media" as folder name instead of "images"; some folders within images/media need to be writable. The config folder must be writable to www-data if setup is to be run (usually we do not run it, but copy).

Software needed

 # image thumbs and video thumbs
 sudo apt-get install imagemagick librsvg2-2 librsvg2-bin
 sudo apt-get install ffmpeg ffmpeg2theora
 # for graphviz / semantic result formats:
 sudo apt-get install graphviz

(When newer version of ImageMagick is needed, see Upgrading Imagemagick to a current version. Currently working ok with Debian 6 version)

Installing mediawiki from git (1.20 and later)

Main source: mediawiki.org: Download from Git. See also overview of wikimedia projects in Git.

IMPORTANT CHANGE in comparison to earlier subversion setup: we directly clone all extensions into the /extension folder, instead of cloning elsewhere and then symlinking.

Memo: use "git tag -l | sort -V" um tags sortiert anzuzeigen

First installation only: Create git-clone on biowikifarm

A biowikifarm git-clone (normal, not bare) of the WMF core and extension repo is created.

# 1. FIRST create a biowikifarm git-clone (non-bare) for mediawiki-core and mw-extensions (submodules):
  cd /usr/share; sudo mkdir mw-wmf-clone; cd /usr/share/mw-wmf-clone
  sudo git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git core
  sudo git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions.git extensions
  sudo git clone https://gerrit.wikimedia.org/r/p/mediawiki/skins.git skins # new!
  cd /usr/share/mw-wmf-clone/extensions; sudo git submodule update --init --recursive
  cd /usr/share/mw-wmf-clone/skins; sudo git submodule update --init --recursive
  # Note: with after init, one can use "git foreach". Example:
  #   git submodule foreach 'echo $path `git rev-parse HEAD`' 
  #   will show the path and currently checked out commit for each submodule.

Update git and export version to folder

This section is identical to the updating, see Mediawiki maintenance > MediaWiki version upgrading (core and wikimedia extensions. SVN is separate however!

Installing extensions from Local subversion

Some extensions unavailable in Wikimedia git exist in our local svn:

 # 4. ONLY FOR FIRST TIME CREATION of SVN-Extensions:
 # Insert the local-svn-managed extensions into the same folder:
 # Note: www-data cannot create the folders, but must be able to write the updates (svn-post-commit hook) -> temp folder
 # Remaining Problem: when a new svn folder is added after this initial setup to the local subversion repo,
 #   that folder must manually chown to www-data; else svn co post-commit errors will occur.
 # e.g.: wikipath="/usr/share/mediawiki20/"
 cd "${wikipath}"
 sudo mkdir TEMP-LOCAL-svn; ## temp folder
 sudo svn checkout file:///var/lib/svn/LocalSVNextensions ./TEMP-LOCAL-svn
 sudo chown -R  www-data:www-data ./TEMP-LOCAL-svn
 sudo mv ./TEMP-LOCAL-svn/* ./extensions; 
 sudo rm ./extensions/.svn -R; 
 sudo mv ./TEMP-LOCAL-svn/.svn ./extensions 
 sudo rm ./TEMP-LOCAL-svn -r

Installation of additional extensions from other sources

 # 5. Installation of additional extensions from other sources
 ### None yet.

Additional tasks

 # 6. Finishing touches. Widgets needs a writable folder:
 cd ${wikipath}
 sudo chown -R  www-data:www-data ./extensions/Widgets/compiled_templates;
 sudo chmod g+w -R  ./extensions/Widgets/compiled_templates;
 # eg. sudo chown -R  www-data:www-data /usr/share/mediawiki20/extensions/Widgets/compiled_templates; sudo chmod g+w -R  /usr/share/mediawiki20/extensions/Widgets/compiled_templates
 # Widgets does not contain all necessary code (-> Warning: require_once(/usr/share/mediawiki20/phase3/extensions/Widgets/smarty/Smarty.class.php): failed to open stream: No such file or directory...)
 # In the absence of installation instructions, using previously saved code:
 sudo cp -r /usr/share/mw-missing-code/Widgets/smarty ./extensions/Widgets
 sudo cp -r /usr/share/mw-missing-code/Widgets/googlecode ./extensions/Widgets
<!--
 # NOTE: in Dec. 2012 the parts were originally copied as seen below:
 sudo mkdir /usr/share/mw-missing-code
 sudo mkdir /usr/share/mw-missing-code/Widgets
 sudo cp -r /usr/share/mediawikistaging/ext-tagged-release/Widgets/smarty /usr/share/mw-missing-code/Widgets
 sudo cp -r /usr/share/mediawikistaging/ext-tagged-release/Widgets/googlecode /usr/share/mw-missing-code/Widgets
-->


Email

Setting up the email functions requires either a local server, or for external server setting $wgSMTP. It also first requires to install the Mail.php functionality:

sudo apt-get install php-mail php-net-smtp

then add to LocalSettings.php:

 ini_set("include_path", ".:$IP:$IP/includes:$IP/languages:/usr/share/php/:/usr/share/php/PEAR/");
 $wgSMTP = array(
 'host'     => "160.45.63.40",
 'IDHost'   => "bgbm.org",
 'port'     => 25,
 'auth'     => true,
 'username' => "xxx123",
 'password' => "xxx123xxx123xxx123"
 );

Update 2017: We use PEAR (must be installed, see mediawiki manual), and had to use the following, slightly more complex install (probably due to updating rather than fresh install):

sudo pear channel-update pear.php.net; sudo pear install mail pear/Auth_SASL net_smtp

Cloning a new wiki

NOTE: some of the following instructions are OLD. THE BETTER PAGE FOR CREATING MEDIAWIKI INSTANCES IS: Create a new mediawiki instance


Any code above needs to be run only the first time. From then on, the template can be reused to clone instances (where "NEW-WIKI" is replaced with the name for your wiki):

 ## for new virtual host:
 cd /var/www/; sudo cp -r wiki-template NEW-hostpath
 cd /var/www/NEW-hostpath/w; sudo chmod a+w cache; sudo chmod a+w media
 ## for new wiki within virtual host:
 cd /var/www/; sudo cp -r wiki-template/w hostpath/newwiki
 cd /var/www/hostpath/newwiki; sudo chmod a+w cache; sudo chmod a+w media
 ## if using installer, also: sudo chmod a+w config;

A useful template wiki as of 2014 is /var/www/v-ztemplate/w

Current template may require: (wiki may be direct in biowikifarm, in v-host, or nested 1 further)

sudo chown www-data:www-data /var/www/*/media -R
sudo chown www-data:www-data /var/www/*/*/media -R
sudo chown www-data:www-data /var/www/*/*/*/media -R
sudo chmod 775 /var/www/*/media -R
sudo chmod 775 /var/www/*/*/media -R
sudo chmod 775 /var/www/*/*/*/media -R

To make all LocalSettings writable:

sudo chmod 775 /var/www/*/LocalSettings.php
sudo chmod 775 /var/www/*/*/LocalSettings.php
sudo chmod 775 /var/www/*/*/*/LocalSettings.php

To reset to readonly:

sudo chmod 640 /var/www/*/LocalSettings.php
sudo chmod 640 /var/www/*/*/LocalSettings.php
sudo chmod 640 /var/www/*/*/*/LocalSettings.php

It is possible to use the install process in a web browser (http://..../NEW-Wiki/config/index.php). However, more usually, the database is copied in mysql (todo: go to z_en_template, go to Operations, use copy option, then go to mysql-localhost, privileges, go to wiki user, add privileges for the new database.

Short note for later installs:

  • Set license first (setting it will void other entries)
  • set localhost:8088
  • set database name and UTF-8 character set.
  • For db creation do not use root, but personal mysql admin account.

Full notes for settings made on the web forms of the MediaWiki installation: For the DPG (society of phytopathologists in Germany): Name=DPG, contact email gh, language de, License: Creative Commons, choose non-commercial, share-alike, Admin name: WikiSysop, (password noted separate), caching memcached 127.0.0.1:11211, email options left default (or user-to-user disabled), DB config: MySQL, localhost:8088 (the port on which we operate mysql), databasename: pmedwiki, user name wikiuser, (password noted separate). adding root credentials so that wikiuser and tables can be created (wikiuser has insufficient rights). No database table prefix (originally we DID use prefixes and a single db, however, that prevents to ever use the single-sign-on mechanism...), engine=InnoDB, character set changed to UTF-8. Click Install, move LocalSettings.php to the parent directory, remove the config folder:

 cd /var/www/NEW-Wiki/; sudo mv config/LocalSettings.php .; sudo rm -rf config


Procedure as script by AP (not entirely tested):

#!/bin/bash
# http://biowikifarm.net/meta/Mediawiki_installation#Cloning_a_new_wiki
wiki_template="./v-ztemplate"
new_wiki_folder="./v-species"
wiki_script_folder="./zt" # default ./w
wiki_config_folder="./mw-config" # default ./w
web_dir="/var/www"
do_web_installation="" # "" is false

cd "${web_dir}"
# copy wiki template
sudo cp -r "${wiki_template}" "${new_wiki_folder}"
# go to wiki folder
cd "${web_dir}/${new_wiki_folder}"; 
# check if different script folder necessary
if ! [ -d  "${web_dir}/${new_wiki_folder}/${wiki_script_folder}" ];then
  sudo mv "${web_dir}/${new_wiki_folder}/w" "${web_dir}/${new_wiki_folder}/${wiki_script_folder}"
fi
# check rights of folders
cd "${web_dir}/${new_wiki_folder}/${wiki_script_folder}"
sudo chmod a+w cache; 
sudo chmod a+w media;
sudo chown www-data:www-data "./media" -R
sudo chmod 775      "./media" -R

if [ "${do_web_installation}" ];then
  # check if the mw-config directory for first install is there
  if ! [ -d "${web_dir}/${new_wiki_folder}/${wiki_script_folder}/${wiki_config_folder}" ];then
    sudo cp /usr/share/mw-wmf-clone/core/mw-config/* ./mw-config/
    sudo mkdir "${web_dir}/${new_wiki_folder}/${wiki_script_folder}/"
    sudo chown www-data:www-data "${web_dir}/${new_wiki_folder}/${wiki_script_folder}/${wiki_config_folder}" -R
    if [ -e "${web_dir}/${new_wiki_folder}/${wiki_script_folder}/LocalSettings.php" ];then
      # installation script won't start if LocalSettings.php is there
      # backup file with date suffix
      modified_date=`stat --format="%y" "${web_dir}/${new_wiki_folder}/${wiki_script_folder}/LocalSettings.php" | awk  '{ print $1 }'`
      sudo mv "${web_dir}/${new_wiki_folder}/${wiki_script_folder}/LocalSettings.php" "${web_dir}/${new_wiki_folder}/${wiki_script_folder}/LocalSettings.php.${modified_date}"
    fi
  sudo chmod a+w "${wiki_config_folder}"; 
  fi
fi

################################################
# step: configure web server (nginx)
################################################

################################################
# step: wiki installation
# if you install a single Wiki use http://your-url.com/wgArticlePath/mw-config/index.php
# OR 
# copy a wiki database template, (adjust another) LocalSettings.php and run as final step:
#   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
################################################
# step: update database
################################################
cd "${web_dir}/${new_wiki_folder}/${wiki_script_folder}";        sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php

For each wiki add to the virtual host configuration to (Originally apache, but as of 2012 to nginx) and restart:

 # sudo /usr/sbin/apache2ctl -k graceful && sudo service nginx restart && sudo service php5-fpm restart
 sudo service apache2 restart && sudo service nginx restart && sudo service php5-fpm restart

For each wiki using ShortURLs, the robot.txt must be updated!

Some extensions need execution of a sql command for each db (where "DBNAME" and "DBUSER" are replaced with actual db name and user) (ls /var/www/NEW-Wiki/extensions/*.sql):

  
  mysql -u USER -p --database=xwiki < /usr/share/mediawiki/extensions/OpenID/openid_table.sql
  mysql -u USER -p --database=xwiki < /usr/share/mediawiki/extensions/TitleKey/titlekey.sql

ConfirmAccount from /usr/share/mediawiki/extensions/ConfirmAccount/ConfirmAccount.sql would create 2 tables: "account_requests", "account_credentials". It is necessary only in the shared sign-on wiki (for us this is metawiki). OpenID creates single table "user_openid". Titlekey creates single table "titlekey". Note: We no longer add the DPL views.

To simplify the setup, we have extracted the common settings from LocalSettings.php into a file called MediaWikiCommonSettings.php directly in the www-root. Usually, because of the manual change to MediaWikiCommonSettings.php, we manually modify a template LocalSettings.php from any wiki and use it instead of the one created by the install process.

Note: virtual wiki path is preferable in lower case because it helps to highlight the page title (having Title-Case)!

Configuration after setup

  • Logo changed in each LocalSettings
  • Short_URL see: http://www.mediawiki.org/wiki/Manual:Short_URL
  • Timezone settings added: ( #Set Default Timezone: // $wgLocaltimezone="Europe/Berlin"; // $wgLocalTZoffset = +120; // putenv("TZ=$wgLocaltimezone");)
  • Security information on preventing editing by anonymous users and user-creation options under Preventing_Access; we added following to MediaWikiCommonSettings.php:
$wgEnableUploads  = true; # (Make sure the php.ini settings are correct, see above)
$wgMaxImageArea = 5e7; # Default is 1.25e7.
  # (support thumb generation for large line drawings which may only be 1.4 MB but larger 5000 px)
# Disable anonymous editing
$wgGroupPermissions['*']['edit'] = false;
# Prevent new user registrations except by sysops
$wgGroupPermissions['*']['createaccount'] = false;
# possible fix to enable JavaScript to function also under https AND http. 
$wgProto = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
$wgServer = $wgProto."://the-wiki-url.net";

(Perhaps see also a blog describing this method). A better method than limiting creation to sysops it the ConfirmAccount extension, which we installed (see extensions below).

Enabling extensions

The first part, establishing the symbolic links, must be done only once for the subversion-managed mediawiki installation, since all further wiki installations symlink to the same phase3/extensions folder. Normally further actions are necessary (LocalSettings.php) for each wiki, but we perform them centrally in MediaWikiCommonSettings.php. Yet some db-specific actions are necessary for some extensions, see at the end. Most extensions are already available through the subversion download. Symbolic links are created to enable selected extensions, initially for:

The CentralAuth extension is difficult to install, although seemingly the only extension supporting single-sign one (users can be shared through shared tables, but sign-ons in browers must be repeated). The initial attempts to use CentralAuth failed. New help is available since, and http://noc.wikimedia.org/conf/highlight.php?file=CommonSettings.php would be an important resource.

In LocalSettings/CommonSettings, add the information for the extensions. The following example may be outdated, check against current file:

 # NEEDS UPDATING - OUT OF DATE VERSIONS PRESENTLY REMOVED!

Additional actions for some extensions:

  • CharInsert requires after standard installation to create/edit MediaWiki:Edittools
    • Good templates are found (but respect the license!) at en.wikipedia or de.wikipedia.
    • The english WP uses a mixture of direct use and Javascript; it requires also MediaWiki:Edittools.js
    • The place where MediaWiki:Edittools.js is being activated needs still to be found! TODO!
  • ConfirmAccount needs sql commands for each db; details under cloning wikis above.
  • OpenID requires the openidenabled.com 2.x libraries. Debian 4 support those only as backports, so make sure the repository has been added (see above). Then issue apt-get install python-openid. Additional sql code is needed; details under cloning wikis above.
  • (Cite may also need additional action, although the mentioned cite layout file is already present. Nothing done so far, needs testing)
  • (Sitenotice: It is possible to set one in LocalSettings.php, but better method is MediaWiki:Sitenotice)
  • Todo:
    • FlaggedRevs has a number of things to do, not yet done
    • install lucene (links on MWSearch page), add and install MWSearch extension

Note: according to testing by Evolaris, the CentralNotice extension is slowing down the Wiki functionality significantly, by loading <script type="text/javascript" src="http://smorgasbord.local/trunk/index.php/Special:NoticeLoader"></script> from external sites. We may want to disable this function again. the function occurs on both KeyToNature and the JKI installations. Note that, although the en and de Wikipedias themselves use the extension, the script does not appear there!!!

(Failed) Attempt to use GlobalUsage

GH: THIS WAS TESTED, BUT WE COULD NOT YET GET IT TO WORK!!

Add to common settings:

$wgGlobalUsageDatabase = "openmedia";
require_once( "$IP/extensions/GlobalUsage/GlobalUsage.php" );

THIS EXTENSION ONLY WORKS WITH setting up a dummy form of http://www.mediawiki.org/wiki/Manual:$wgLBFactoryConf - even if Loadbalancing is acutally not used!

Initialize with:

 # create central table in image repository (only first time; alternatively update.php will also do this):
 cd /var/www/v-species/o;    sudo php ./maintenance/sql.php ./extensions/GlobalUsage/GlobalUsage.sql --conf ./LocalSettings.php
 # record file usage on all other wikis:
 cd /var/www/metawiki;   sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/studienstiftungswiki;   sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/testwiki;   sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/testwiki2;  sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-floramalesiana/w;     sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-ispi/w;   sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-k2n/w;    sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-k2n/h;    sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-k2n/it;   sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-k2n/sl;   sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-lias/w;   sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-nnvm/w;   sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-on/w;     sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-orowiki/w;sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-phytomed/w;       sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-phytopathology/w; sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-plantnet/terms/e; sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-plantnet/terms/f; sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-plantnet/uses/e;  sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-plantnet/uses/f;  sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-rosaceae/w;  sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-species/f;   sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-species/o;   sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-species/s;   sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-species/w;   sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-workbench/w; sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php
 cd /var/www/v-zsm/w;       sudo php ./extensions/GlobalUsage/refreshGlobalimagelinks.php --conf ./LocalSettings.php

Removing tables for Cleanup (check for new wikis that need to be added!): DROP TABLE enwiki.globalimagelinks; DROP TABLE ispiwiki.globalimagelinks; DROP TABLE k2n_handbook.globalimagelinks; DROP TABLE k2n_it.globalimagelinks; DROP TABLE k2n_sl.globalimagelinks; DROP TABLE k2n_wiki.globalimagelinks; DROP TABLE liaswiki.globalimagelinks; DROP TABLE malesiana_wiki.globalimagelinks; DROP TABLE metawiki.globalimagelinks; DROP TABLE nnvmwiki.globalimagelinks; DROP TABLE onwiki.globalimagelinks; DROP TABLE openmedia.globalimagelinks; DROP TABLE orowiki.globalimagelinks; DROP TABLE plantnet_terms_en.globalimagelinks; DROP TABLE plantnet_terms_fr.globalimagelinks; DROP TABLE plantnet_uses_en.globalimagelinks; DROP TABLE plantnet_uses_fr.globalimagelinks; DROP TABLE plazi_wiki.globalimagelinks; DROP TABLE pmedwiki.globalimagelinks; DROP TABLE rosawiki.globalimagelinks; DROP TABLE specialmedia.globalimagelinks; DROP TABLE specieswiki.globalimagelinks; DROP TABLE species_fr.globalimagelinks; DROP TABLE studienstiftungswiki.globalimagelinks; DROP TABLE testwiki.globalimagelinks; DROP TABLE testwiki2.globalimagelinks; DROP TABLE wbwiki.globalimagelinks; DROP TABLE zsm_entomology.globalimagelinks;

2011: mwlib extension for open document support

Source: http://code.pediapress.com/wiki/wiki/mwlib-install - the easy-install variant seems more feasable, the git/re2c variant requires code later than debian lenny

sudo apt-get install g++ perl python python-dev python-setuptools python-imaging
sudo easy_install -U setuptools
sudo easy_install mwlib && rehash

The last command resulted in a number of error, however.

(Failed) Attempt to use pngscale

https://bugzilla.wikimedia.org/show_bug.cgi?id=9497 / https://github.com/dcoetzee/pngscale

sudo apt-get install libpng-dev
cd /home/XXXXX; 
git clone git://github.com/dcoetzee/pngscale.git
# not: git checkout git://github.com/dcoetzee/pngscale.git
cd pngscale
make
cp pngscale /usr/bin

Then in CommonSettings.php:

$wgMaxShellFileSize = 2097152
$wgCustomConvertCommandsByExtension['png'] = "/usr/bin/pngscale %s %d %w %h";

Open Questions

  • TODO: Install and test Extension:CentralAuth. The special tables are created in wikidb, and a variant for CommonSettings2.php exists in the root. However, configuring the wgConfig variable remained unclear for a config with with prefixed tables for multiple wikis in a single database. Could not get it to work...
    • CentralAuth is confirmed not to work at present when multiple wikis are kept in a single DB, separated by table prefixes. (Originally, we used such a setup, but have changed to separate databases by now.)
    • Instead we configured one Wiki-database to manage the users from all Wikis (using the localsettings variable $wgSharedDB). This provides single identity, although not single sign-on.
    • If we fail to get this running, drop the tables again: DROP TABLE globalnames; DROP TABLE localnames; DROP TABLE globaluser; DROP TABLE localuser; DROP TABLE global_user_groups; DROP TABLE global_group_permissions;

Securing MediaWiki

See MediaWiki Manual:Security


Further information can be found under Mediawiki maintenance (maintenance/backup/upgrading)