Mediawiki software - installatienotities/en: verschil tussen versies

Uit MakerSpace Leiden
Ga naar: navigatie, zoeken
(Nieuwe pagina aangemaakt met 'Study the release notes!')
(Nieuwe pagina aangemaakt met '* start serving the wiki root again by Apache2 (if you did not do this already). * test. * update this documentation if needed.')
 
(20 tussenliggende versies door 2 gebruikers niet weergegeven)
Regel 10: Regel 10:
 
* These version specific directories also contain the extensions used (i.e. MLEB, see below).
 
* These version specific directories also contain the extensions used (i.e. MLEB, see below).
  
Extensions
+
=== Extensions ===
  
 
The only additional extension used (besides the standard package installed by default) is the 'multi language extension bundle' ([https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle MLEB]). This extension (set) enables multiple languages and translation workflow in the mediawiki.
 
The only additional extension used (besides the standard package installed by default) is the 'multi language extension bundle' ([https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle MLEB]). This extension (set) enables multiple languages and translation workflow in the mediawiki.
  
Updating mediawiki
+
== Updating mediawiki ==
  
Backing up
+
=== Backing up ===
  
System backup
+
==== System backup ====
  
 
<code>sudo /etc/duplicity/run.sh</code>
 
<code>sudo /etc/duplicity/run.sh</code>
  
Database backups
+
==== Database backups ====
  
 
Create backups in sql en xml:
 
Create backups in sql en xml:
Regel 39: Regel 39:
 
Best to uncompress the archive in your home directory and not directly in /usr/var.
 
Best to uncompress the archive in your home directory and not directly in /usr/var.
  
Study the release notes
+
=== Study the release notes ===
  
 
The release notes contain important changes, instructions and last minute notices. These might be more accurate and up-to-date than the document you are reading now.
 
The release notes contain important changes, instructions and last minute notices. These might be more accurate and up-to-date than the document you are reading now.
  
Study the release notes!
+
=== Study the release notes! ===
  
Nogmaals. Zodat je zeker weet waar je mee bezig bent.
+
... read them again. Make sure you know what you are doing.
  
=== verplaats ===
+
=== move ===
  
Voordat je hiermee aan de slag gaat is het slim om apache even te laten stoppen met het uitserveren van mediawiki (in /etc/apache2/conf-enabled).
+
Before moving the software to its final location, it is advised to pause serving mediawiki by apache (in /etc/apache2/conf-enabled).
  
* Verplaats de code naar /usr/share/mediawiki-<versie> en chown deze naar wikiadmin.
+
* Move the code to /usr/share/mediawiki-<version> and change the owner to wikiadmin (chown).
* maak in deze directory een symbolic link aan van LocalSettings.php naar /etc/mediawiki/LocalSettings.php
+
* Create a symbolic link in this directory from LocalSettings.php to /etc/mediawiki/LocalSettings.php
* maak in deze directory een symbolic link aan van images naar /var/lib/images
+
* Create a symbolic link in this directory from images to /var/lib/images
* en uiteindelijk maak een nieuwe symbolic link aan van /usr/share/mediawiki naar de nieuwe versie /usr/share/mediawiki.versie.
+
* And finally, create a symbolic link in this directory from /usr/share/mediawiki to the new version /usr/share/mediawiki-<version>.
  
Kijk in de release notes of je nog andere dingen aan moet passen.
+
Check the release note for any other required additional actions.
  
=== update de database ===
+
=== update the database ===
  
''Neem nu risico'' en voer het database-update script 'update.php' uit in /usr/share/mediawiki/maintenance. Met een beetje geluk werkt dit.  
+
Now... "Take Risk" and execute the database update script "update.php" in /usr/share/mediawiki/maintenance. With a little luck you should have updated your database now.  
  
== updaten van de extensies ==
+
== Updating the extensions ==
  
Het updaten van de MLEB extensie is volledig standaard, zoals [https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle beschreven]. De extensie plaats je in /usr/share/mediawiki-<versis>/extensions. Vergeet ook hier de release notes niet.
+
Updating the MLEB extension is a standard procedure as described [https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle here]. Place the extension in /usr/share/mediawiki-<version>/extensions. Please do not forget to check the release notes for additional instructions and clarity.  
  
== afronden van de update ==
+
The configuration of MLEB is customized a little in order to be able to set the page language manually (as some page originals are written in English):
  
* Laat apache2 weer doorgaan met het uitserveren van de mediawiki (als je dat in een van de voorgaande stappen al niet had gedaan)
+
<code>$wgPageLanguageUseDB = true;</code>
* test
+
 
* Pas deze documentatie aan als deze aangepast of verbeterd moet worden.
+
<code>$wgGroupPermissions['sysop']['pagelang'] = true;</code>
 +
 
 +
== finishing the update ==
 +
 
 +
* start serving the wiki root again by Apache2 (if you did not do this already).
 +
* test.
 +
* update this documentation if needed.

Huidige versie van 21 sep 2018 om 16:21

Andere talen:
English • ‎Nederlands

From summer 2018 onwards, the mediawiki package and installation is not managed by apt anymore but manually. This to have more fine grained control over the versions we run at makerspace.

Locations of the software

  • The apache2 document root for mediawiki is /var/lib/mediawiki. This directory mainly contains symbolic links to files in /usr/share/mediawiki, but also some hard data, like the images, cache, uploads and config directories with user generated files.
  • /usr/share/mediawiki is a link itself, it points to /usr/share/mediawiki-<version>, where the real software is located. At this moment this is /usr/share/mediawiki-1.31.0.
  • These version specific directories contain symbolic links from LocalSettings.php to /etc/mediawiki/LocalSettings.php. Also, /etc/mediawiki contains a backup copy of Apache2's gloval config file mediawiki.conf.
  • These version specific directories also contain the extensions used (i.e. MLEB, see below).

Extensions

The only additional extension used (besides the standard package installed by default) is the 'multi language extension bundle' (MLEB). This extension (set) enables multiple languages and translation workflow in the mediawiki.

Updating mediawiki

Backing up

System backup

sudo /etc/duplicity/run.sh

Database backups

Create backups in sql en xml: mysqldump -h localhost -u mediawiki -p --default-character-set=utf8 mediawiki --single-transaction > mediawikibackup.sql

mysqldump -h localhost -u mediawiki -p --xml mediawiki --single-transaction > mediawikibackup.xml

(Authorisation data can be found in LocalSettings.php)

download mediawiki

The most recent version of mediawiki can be found at https://www.mediawiki.org/wiki/Download. You can use wget to download, e.g.:

wget https://releases.wikimedia.org/mediawiki/1.27/mediawiki-1.31.0.tar.gz

Best to uncompress the archive in your home directory and not directly in /usr/var.

Study the release notes

The release notes contain important changes, instructions and last minute notices. These might be more accurate and up-to-date than the document you are reading now.

Study the release notes!

... read them again. Make sure you know what you are doing.

move

Before moving the software to its final location, it is advised to pause serving mediawiki by apache (in /etc/apache2/conf-enabled).

  • Move the code to /usr/share/mediawiki-<version> and change the owner to wikiadmin (chown).
  • Create a symbolic link in this directory from LocalSettings.php to /etc/mediawiki/LocalSettings.php
  • Create a symbolic link in this directory from images to /var/lib/images
  • And finally, create a symbolic link in this directory from /usr/share/mediawiki to the new version /usr/share/mediawiki-<version>.

Check the release note for any other required additional actions.

update the database

Now... "Take Risk" and execute the database update script "update.php" in /usr/share/mediawiki/maintenance. With a little luck you should have updated your database now.

Updating the extensions

Updating the MLEB extension is a standard procedure as described here. Place the extension in /usr/share/mediawiki-<version>/extensions. Please do not forget to check the release notes for additional instructions and clarity.

The configuration of MLEB is customized a little in order to be able to set the page language manually (as some page originals are written in English):

$wgPageLanguageUseDB = true;

$wgGroupPermissions['sysop']['pagelang'] = true;

finishing the update

  • start serving the wiki root again by Apache2 (if you did not do this already).
  • test.
  • update this documentation if needed.