MediaWiki: Unterschied zwischen den Versionen

Aus wiki.frank-wulf.de
Zur Navigation springen Zur Suche springen
Die Seite wurde neu angelegt: „=Upgrading MediaWiki= 1. Download and install new version in new folder <syntaxhighlight>cd /var/lib wget https://releases.wikimedia.org/mediawiki/1.32/mediaw…“
 
Keine Bearbeitungszusammenfassung
 
(5 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
__FORCETOC__
=Upgrading MediaWiki=
=Upgrading MediaWiki=


1. Download and install new version in new folder
<syntaxhighlight>cd /var/lib
wget https://releases.wikimedia.org/mediawiki/1.32/mediawiki-1.32.0.tar.gz
tar -xvzf mediawiki-1.32.0.tar.gz
rm mediawiki-1.32.0.tar.gz</syntaxhighlight>


1. Download and install new version in new directory
<syntaxhighlight lang="bash">export VERSION_SHORT=1.32
export VERSION_LONG=1.32.0
export VERSION_OLD=1.31.0
cd /var/lib
wget https://releases.wikimedia.org/mediawiki/"${VERSION_SHORT}"/mediawiki-"${VERSION_LONG}".tar.gz
tar -xvzf mediawiki-"${VERSION_LONG}".tar.gz
rm mediawiki-"${VERSION_LONG}".tar.gz</syntaxhighlight>


2. Create new directory
2. Copy configuration file and images to new directory
<syntaxhighlight>mkdir /usr/share/phpmyadmin</syntaxhighlight>
<syntaxhighlight lang="bash">cp -r --preserve=all ./mediawiki/LocalSettings.php ./mediawiki-"${VERSION_LONG}"
rsync -axHAWXS --numeric-ids --info=progress2 ./mediawiki/images/ ./mediawiki-"${VERSION_LONG}"/images</syntaxhighlight>


3. Download and extract phpMyAdmin archive
3. Rename the old installation directory and then rename the new one to match the old name
<syntaxhighlight>wget -qO- https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz | tar -xzvf - -C /usr/share/phpmyadmin --strip-components=1</syntaxhighlight>
<syntaxhighlight lang="bash">mv mediawiki mediawiki-"${VERSION_OLD}"
mv mediawiki-"${VERSION_LONG}" mediawiki</syntaxhighlight>


4. Create directory for temporary files used by phpMyAdmin
4. Run update script for database scheme
<syntaxhighlight>mkdir /usr/share/phpmyadmin/tmp && chown www-data:www-data /usr/share/phpmyadmin/tmp</syntaxhighlight>
<syntaxhighlight lang="bash">cd mediawiki/maintenance
php update.php</syntaxhighlight>


5. Copy original config file to new directory
5. Restart Apache Webserver
<syntaxhighlight>cp -r --preserve=all /usr/share/phpmyadmin-old/config.inc.php /usr/share/phpmyadmin</syntaxhighlight>
<syntaxhighlight lang="bash">systemctl restart apache2
 
</syntaxhighlight>
6. Remove directory containing the old version
<syntaxhighlight>rm -rf /usr/share/phpmyadmin-old</syntaxhighlight>

Aktuelle Version vom 29. Juli 2023, 18:16 Uhr

Upgrading MediaWiki

1. Download and install new version in new directory

export VERSION_SHORT=1.32
export VERSION_LONG=1.32.0
export VERSION_OLD=1.31.0
cd /var/lib
wget https://releases.wikimedia.org/mediawiki/"${VERSION_SHORT}"/mediawiki-"${VERSION_LONG}".tar.gz
tar -xvzf mediawiki-"${VERSION_LONG}".tar.gz
rm mediawiki-"${VERSION_LONG}".tar.gz

2. Copy configuration file and images to new directory

cp -r --preserve=all ./mediawiki/LocalSettings.php ./mediawiki-"${VERSION_LONG}"
rsync -axHAWXS --numeric-ids --info=progress2 ./mediawiki/images/ ./mediawiki-"${VERSION_LONG}"/images

3. Rename the old installation directory and then rename the new one to match the old name

mv mediawiki mediawiki-"${VERSION_OLD}"
mv mediawiki-"${VERSION_LONG}" mediawiki

4. Run update script for database scheme

cd mediawiki/maintenance
php update.php

5. Restart Apache Webserver

systemctl restart apache2