MediaWiki/Update: Unterschied zwischen den Versionen

Aus Foxwiki
 
(240 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
Alle Updates sollten zeitnah installiert werden!
'''Mediawiki Update''' - Software-Aktualisierung


= Backup =
== Vorbereitung ==
== SQL Database Dump ==
; Mailingliste abonnieren
mysqldump --user=wikidb_user --password=wikidb_userpassword wikidb > file.sql
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce Mailingliste MediaWiki-Ankündigungen]


== Filesystem structure ==
; Version ermitteln
$ tar -czf backup/wiki_2020-04-12.tar.gz wiki/
* [[Spezial:Version]]


= Download =
; Download
* https://www.mediawiki.org/wiki/Download
Aktuelle Version
$ wget https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.2.tar.gz
siehe https://www.mediawiki.org/wiki/Download


= Entpacken =
<syntaxhighlight lang="bash" highlight="1" line>
== Archiv entpacken ==
wget https://releases.wikimedia.org/mediawiki/1.42/mediawiki-1.42.3.tar.gz
$ tar -xzf mediawiki-1.35.2.tar.gz
</syntaxhighlight>


= Zugriffsrechte anpassen =
=== Datensicherung ===
# chown -R user.group mediawiki-1.35.2
; Konfiguration ermitteln
<syntaxhighlight lang="bash" highlight="1" line>
grep '$wgDB' mediawiki/LocalSettings.php
$wgDBtype = "mysql";
$wgDBserver = "127.0.0.1";
$wgDBname = wgDBname;
$wgDBuser = wgDBuser;
$wgDBpassword = wgDBpassword;
$wgDBprefix = "";
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
</syntaxhighlight>


= Daten von alter Installation übertragen =
LocalSettings.php
$ cp -ai mediawiki-1.35.0/LocalSettings.php mediawiki-1.35.1/


Images
; Datenbank
$ cp -ai mediawiki-1.35.0/images/ mediawiki-1.35.1/
<syntaxhighlight lang="bash" highlight="1" line>
mysqldump --user=$wgDBuser --password=$wgDBpassword $wgDBname > backup/$wgDBname_$(date -I).sql
</syntaxhighlight>


Extensions
; Dateisystem
$ cp -au mediawiki-1.35.0/extensions/ mediawiki-1.35.1/
<syntaxhighlight lang="bash" highlight="1" line>
tar -czf backup/wiki_$(date -I).tar.gz wiki/
</syntaxhighlight>


resources/assets/
== Durchführung ==
  $ cp -aiu mediawiki-1.35.0/resources/assets/ mediawiki-1.35.1/resources/
=== Variable ===
Neue Wikimedia-Version in Variable speichern
<syntaxhighlight lang="bash" highlight="1" line>
export NewWikiVersion=mediawiki-1.42.3
</syntaxhighlight>


= LocalSettings.php anpassen =
=== Archiv entpacken ===
If you use the same <tt>LocalSettings.php</tt> from the old version, you may need to adapt it to how new versions handle it.
<syntaxhighlight lang="bash" highlight="1" line>
tar -xf $NewWikiVersion.tar.gz
</syntaxhighlight>


=== Andere Variablen ===
=== Daten übertragen ===
* Einige Variablen könnten obsolet geworden oder gar entfernt worden sein.
<syntaxhighlight lang="bash" highlight="1-5" line>
* Diese in <tt>LocalSettings.php</tt> zu haben wird für gewöhnlich keinen Effekt haben.
cp -au mediawiki/images/ mediawiki/skins/ mediawiki/extensions/ mediawiki/LocalSettings.php $NewWikiVersion/
* Neue Variablen können in neueren Versionen hinzugefügt worden sein, oder einige existierende Variablen ihren Typ geändert haben.
cp -au mediawiki/resources/assets/ $NewWikiVersion/resources/
* We usually try to use sane defaults for them, and in case of type change, be backwards compatible.
</syntaxhighlight>
* In any case, take a look at the release notes to see those changes.


= Extensions-Updates =
=== Konfiguration anpassen ===
* Certain extensions have been updated in order to work with the new version of MediaWiki.
# Versionshinweise auf Änderungen prüfen
* Be sure to upgrade to the latest versions of such extensions.  
# Entfallene Variablen
* You might need to perform manual updates to custom extensions.
#* Keine Wirkung mehr
* Different [https://www.mediawiki.org/wiki/Special:MyLanguage/tarballs tarballs] include some subsets of extensions and have versioning which helps you upgrade choosing the right one for your MediaWiki core release.  
#* Müssen ggf. angepasst werden
* [https://www.mediawiki.org/wiki/Special:ExtensionDistributor Extension Distributor] works well for most people who want a snapshot of extensions that will work with their supported versions of MediaWiki.
# Neue Variablen
* If you want a lot of extensions then [https://www.mediawiki.org/wiki/Special:MyLanguage/Download_from_Git downloading from Git] is probably best.
#* Müssen ggf. ergänzt werden
* If you don't have Git but you want to upgrade a lot of extensions, you might consider using [https://www.mediawiki.org/wiki/MwExtUpgrader mwExtUpgrader].
# Änderung des Variablen-Typs
#* Datentyp einer Variable kann sich geändert haben
#* Es wird versucht, vernünftige Standardwerte zu verwenden, und im Falle einer Typänderung abwärtskompatibel zu sein


= Aktualisierungsskript =
=== Einstiegspunkt ändern ===
* Sie können die MediaWiki-Datenbank auf zwei Arten aktualisieren: Entweder von der Kommandozeile oder vom Webbrowser aus.
<syntaxhighlight lang="bash" highlight="1" line>
* Wenn Sie Shell-Zugang zu Ihrem Server haben, wird ein Upgrade von der Kommandozeile aus empfohlen, da dies das Risiko verringert, dass der Upgrade-Prozess durch einen Timeout oder einen Verbindungsreset unterbrochen wird.
mv mediawiki mediawiki.old ; mv $NewWikiVersion mediawiki
* Das Skript wird auch versuchen jede fehlende Abhängigkeit herunterzuladen, welche MediaWiki benötigt.  
</syntaxhighlight>
$ sudo -u web7 php update.php


== Siehe auch ==
=== Update-Skript ===
* Greg Sabino Mullane's Blog post provides some [http://blog.endpoint.com/2014/10/mediawiki-minor-upgrade-with-patches.html more detail about point release upgrades].
* Abhängigkeiten auflösen
* [https://www.mediawiki.org/wiki/Project:Support_desk Project:Support desk] if you need help or something went wrong
* Datenbank aktualisieren
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Category:MediaWiki_deprecated_or_obsolete_features Category:MediaWiki deprecated or obsolete features]
<syntaxhighlight lang="bash" highlight="1" line>
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Backing_up_a_wiki Anleitung:Backup eines Wikis]
php8.2 mediawiki/maintenance/update.php --force
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Restoring_a_wiki_from_backup Manual:Restoring a wiki from backup]
</syntaxhighlight>
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Moving_a_wiki Manual:Moving a wiki]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Restoring_wiki_code_from_cached_HTML Manual:Restoring wiki code from cached HTML] - wenn du kein erfolgreiches Backup hast
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Installing Manual:Installing]


[[Category:Wiki]]
Aktualisierung per Webbrowser
* https://wiki.foxtom.de/mw-config/index.php
 
=== Erweiterungen aktualisieren ===
* Manche Erweiterungen wurden aktualisiert, um mit der neuen Version von MediaWiki zu funktionieren
* Stellen Sie sicher, dass Sie auf die neuesten Versionen dieser Erweiterungen aktualisieren
 
==== mwExtUpgrader ====
Erweiterungen mit [https://www.mediawiki.org/wiki/MwExtUpgrader mwExtUpgrader] aktualisieren
 
; Beispiel
<syntaxhighlight lang="bash" highlight="1,4,5,12-15" line>
php8.2 mwExtUpgrader.phar
Note that this release of code is not stable. Do not use for production.
Welcome to use mwExtUpgrader. This script can help you bulk upgrade MediaWiki extensions.
Continue with this action? (y/n) y
Please type the absolute path to the MediaWiki directory: /var/www/wiki.foxtom.de/wiki/mediawiki
mwExtUpgrader detected your MediaWiki version is 1.42.1
Confirm version to be upgraded (default: 1.42)
  [0] 1.39
  [1] 1.40
  [2] 1.41
  [3] 1.42
> 3
ExtensionDistributor unsupported PdfBook
PageOwnership unsupported REL1_42
DrawioEditor unsupported REL1_42
CodeEditor successfully upgraded
MultimediaViewer successfully upgraded
Renameuser successfully upgraded
Cite successfully upgraded
ConfirmAccount successfully upgraded
PageImages successfully upgraded
Gadgets successfully upgraded
SyntaxHighlight_GeSHi successfully upgraded to 2.0
MobileFrontend successfully upgraded to 2.4.1
RevisionSlider successfully upgraded
CategoryTree successfully upgraded
SecureLinkFixer successfully upgraded
Lockdown successfully upgraded
Poem successfully upgraded
Linter successfully upgraded
TitleBlacklist successfully upgraded to 1.5.0
NativeSvgHandler successfully upgraded to 1.5.0
Math successfully upgraded
Interwiki successfully upgraded to 3.2
ReplaceText successfully upgraded to 1.8
Echo successfully upgraded
OATHAuth successfully upgraded to 0.5.0
TocTree successfully upgraded to 1.12.0
DiscussionTools successfully upgraded to 0.0.0
LoginNotify successfully upgraded to 0.1
PdfHandler successfully upgraded
AbuseFilter successfully upgraded
CiteThisPage successfully upgraded
InputBox successfully upgraded to 0.3.0
ConfirmEdit successfully upgraded to 1.6.0
Scribunto successfully upgraded
WikiEditor successfully upgraded to 0.5.4
MsUpload successfully upgraded to 13.5
Thanks successfully upgraded to 1.2.0
ParserFunctions successfully upgraded to 1.6.1
UserMerge successfully upgraded to 1.10.2
VisualEditor successfully upgraded
TemplateData successfully upgraded to 0.1.2
Nuke successfully upgraded
SpamBlacklist successfully upgraded
ImageMap successfully upgraded
TextExtracts successfully upgraded
JSBreadCrumbs successfully upgraded to 1.1.1
MinervaNeue successfully upgraded
Timeless successfully upgraded to 0.9.1
Vector successfully upgraded to 1.0.0
MonoBook successfully upgraded
</syntaxhighlight>
 
==== Manuell aktualisieren ====
Möglicherweise müssen Sie eigene Erweiterungen manuell aktualisieren
* Verschiedene [https://www.mediawiki.org/wiki/Special:MyLanguage/tarballs tarballs] enthalten einige Untergruppen von Erweiterungen und haben eine Versionierung, die Ihnen hilft, die richtige für Ihre MediaWiki-Kernversion zu wählen.
* [https://www.mediawiki.org/wiki/Special:ExtensionDistributor Extension Distributor] funktioniert gut für die meisten Leute, die einen Schnappschuss von Erweiterungen wollen, die mit ihren unterstützten Versionen von MediaWiki funktionieren werden.
 
Wenn Sie viele Erweiterungen wollen, ist [https://www.mediawiki.org/wiki/Special:MyLanguage/Download_from_Git downloading from Git] wahrscheinlich am besten.
 
<noinclude>
 
== Anhang ==
=== Siehe auch ===
==== Dokumentation ====
==== Links ====
===== Projekt =====
===== Weblinks =====
# Greg Sabino Mullane's Blog post provides some [http://blog.endpoint.com/2014/10/mediawiki-minor-upgrade-with-patches.html more detail about point release upgrades].
# [https://www.mediawiki.org/wiki/Project:Support_desk Project:Support desk] if you need help or something went wrong
# [https://www.mediawiki.org/wiki/Special:MyLanguage/Kategorie:/MediaWiki_deprecated_or_obsolete_features Kategorie/MediaWiki deprecated or obsolete features]
# [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Backing_up_a_wiki Anleitung:Backup eines Wikis]
# [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Restoring_a_wiki_from_backup Manual:Restoring a wiki from backup]
# [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Moving_a_wiki Manual:Moving a wiki]
# [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Restoring_wiki_code_from_cached_HTML Manual:Restoring wiki code from cached HTML] - wenn du kein erfolgreiches Backup hast
# [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Installing Manual:Installing]
 
[[Kategorie:MediaWiki/Verwaltung]]
[[Kategorie:MediaWiki/Extension]]
</noinclude>

Aktuelle Version vom 12. Oktober 2024, 10:30 Uhr

Mediawiki Update - Software-Aktualisierung

Vorbereitung

Mailingliste abonnieren
Version ermitteln
Download

Aktuelle Version siehe https://www.mediawiki.org/wiki/Download

wget https://releases.wikimedia.org/mediawiki/1.42/mediawiki-1.42.3.tar.gz

Datensicherung

Konfiguration ermitteln
grep '$wgDB' mediawiki/LocalSettings.php
$wgDBtype = "mysql";
$wgDBserver = "127.0.0.1";
$wgDBname = wgDBname;
$wgDBuser = wgDBuser;
$wgDBpassword = wgDBpassword;
$wgDBprefix = "";
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";


Datenbank
mysqldump --user=$wgDBuser --password=$wgDBpassword $wgDBname > backup/$wgDBname_$(date -I).sql
Dateisystem
tar -czf backup/wiki_$(date -I).tar.gz wiki/

Durchführung

Variable

Neue Wikimedia-Version in Variable speichern

export NewWikiVersion=mediawiki-1.42.3

Archiv entpacken

tar -xf $NewWikiVersion.tar.gz

Daten übertragen

cp -au mediawiki/images/ mediawiki/skins/ mediawiki/extensions/ mediawiki/LocalSettings.php $NewWikiVersion/
cp -au mediawiki/resources/assets/ $NewWikiVersion/resources/

Konfiguration anpassen

  1. Versionshinweise auf Änderungen prüfen
  2. Entfallene Variablen
    • Keine Wirkung mehr
    • Müssen ggf. angepasst werden
  3. Neue Variablen
    • Müssen ggf. ergänzt werden
  4. Änderung des Variablen-Typs
    • Datentyp einer Variable kann sich geändert haben
    • Es wird versucht, vernünftige Standardwerte zu verwenden, und im Falle einer Typänderung abwärtskompatibel zu sein

Einstiegspunkt ändern

mv mediawiki mediawiki.old ; mv $NewWikiVersion mediawiki

Update-Skript

  • Abhängigkeiten auflösen
  • Datenbank aktualisieren
php8.2 mediawiki/maintenance/update.php --force

Aktualisierung per Webbrowser

Erweiterungen aktualisieren

  • Manche Erweiterungen wurden aktualisiert, um mit der neuen Version von MediaWiki zu funktionieren
  • Stellen Sie sicher, dass Sie auf die neuesten Versionen dieser Erweiterungen aktualisieren

mwExtUpgrader

Erweiterungen mit mwExtUpgrader aktualisieren

Beispiel
php8.2 mwExtUpgrader.phar
Note that this release of code is not stable. Do not use for production.
Welcome to use mwExtUpgrader. This script can help you bulk upgrade MediaWiki extensions.
Continue with this action? (y/n) y
Please type the absolute path to the MediaWiki directory: /var/www/wiki.foxtom.de/wiki/mediawiki
mwExtUpgrader detected your MediaWiki version is 1.42.1
Confirm version to be upgraded (default: 1.42)
  [0] 1.39
  [1] 1.40
  [2] 1.41
  [3] 1.42
 > 3
ExtensionDistributor unsupported PdfBook
PageOwnership unsupported REL1_42
DrawioEditor unsupported REL1_42
CodeEditor successfully upgraded
MultimediaViewer successfully upgraded
Renameuser successfully upgraded
Cite successfully upgraded
ConfirmAccount successfully upgraded
PageImages successfully upgraded
Gadgets successfully upgraded
SyntaxHighlight_GeSHi successfully upgraded to 2.0
MobileFrontend successfully upgraded to 2.4.1
RevisionSlider successfully upgraded
CategoryTree successfully upgraded
SecureLinkFixer successfully upgraded
Lockdown successfully upgraded
Poem successfully upgraded
Linter successfully upgraded
TitleBlacklist successfully upgraded to 1.5.0
NativeSvgHandler successfully upgraded to 1.5.0
Math successfully upgraded
Interwiki successfully upgraded to 3.2
ReplaceText successfully upgraded to 1.8
Echo successfully upgraded
OATHAuth successfully upgraded to 0.5.0
TocTree successfully upgraded to 1.12.0
DiscussionTools successfully upgraded to 0.0.0
LoginNotify successfully upgraded to 0.1
PdfHandler successfully upgraded
AbuseFilter successfully upgraded
CiteThisPage successfully upgraded
InputBox successfully upgraded to 0.3.0
ConfirmEdit successfully upgraded to 1.6.0
Scribunto successfully upgraded
WikiEditor successfully upgraded to 0.5.4
MsUpload successfully upgraded to 13.5
Thanks successfully upgraded to 1.2.0
ParserFunctions successfully upgraded to 1.6.1
UserMerge successfully upgraded to 1.10.2
VisualEditor successfully upgraded
TemplateData successfully upgraded to 0.1.2
Nuke successfully upgraded
SpamBlacklist successfully upgraded
ImageMap successfully upgraded
TextExtracts successfully upgraded
JSBreadCrumbs successfully upgraded to 1.1.1
MinervaNeue successfully upgraded
Timeless successfully upgraded to 0.9.1
Vector successfully upgraded to 1.0.0
MonoBook successfully upgraded

Manuell aktualisieren

Möglicherweise müssen Sie eigene Erweiterungen manuell aktualisieren

  • Verschiedene tarballs enthalten einige Untergruppen von Erweiterungen und haben eine Versionierung, die Ihnen hilft, die richtige für Ihre MediaWiki-Kernversion zu wählen.
  • Extension Distributor funktioniert gut für die meisten Leute, die einen Schnappschuss von Erweiterungen wollen, die mit ihren unterstützten Versionen von MediaWiki funktionieren werden.

Wenn Sie viele Erweiterungen wollen, ist downloading from Git wahrscheinlich am besten.


Anhang

Siehe auch

Dokumentation

Links

Projekt
Weblinks
  1. Greg Sabino Mullane's Blog post provides some more detail about point release upgrades.
  2. Project:Support desk if you need help or something went wrong
  3. Kategorie/MediaWiki deprecated or obsolete features
  4. Anleitung:Backup eines Wikis
  5. Manual:Restoring a wiki from backup
  6. Manual:Moving a wiki
  7. Manual:Restoring wiki code from cached HTML - wenn du kein erfolgreiches Backup hast
  8. Manual:Installing