MediaWiki Upgrade: Difference between revisions

From JoBaPedia
Jump to navigation Jump to search
No edit summary
 
Line 20: Line 20:
* Make sure LocalSettings.php uses line '$wgScriptPath = "/mediawiki";' and that path matches with the ALIAS used by apache
* Make sure LocalSettings.php uses line '$wgScriptPath = "/mediawiki";' and that path matches with the ALIAS used by apache
* Now comment out the ALIAS for mw-config and restart apache
* Now comment out the ALIAS for mw-config and restart apache
== Personalize ==
One of the few things I changed was the logo. Edit $wgLogo in LocalSettings.php
$wgLogo = "$wgResourceBasePath/images/Jobapedia.png";
This will use /srv/www/mediawiki/webroot/images/Jobapedia.png as a logo.


== Old Stuff ==
== Old Stuff ==

Latest revision as of 13:55, 18 June 2020

MediaWiki uses MariaDB, Apache and PHP.

Install

Mediawiki comes from Repo server:php:applications MariaDB, Apache and PHP are packages of the standard distribution repos

zypper ar server:php:applications https://download.opensuse.org/repositories/server:/php:/applications/openSUSE_Leap_15.1/
zypper install php7 apache2 mariadb mediawiki php7-APCu

The last package (php7-APCu) is optional (used for page caching). Not going through apache config here, just the mediawiki specifics.

Configure

  • Enable additional apache modules version, php7, rewrite in /etc/sysconfig/apache2 variable APACHE_MODULES
  • Configure /etc/apache2/conf.d/mediawiki
Alias /mediawiki/mw-config/     /srv/www/mediawiki/webroot/mw-config/
Alias /mediawiki/               /srv/www/mediawiki/webroot/
Alias /mediawiki                /srv/www/mediawiki/webroot/index.php
  • Call http://localhost/mediawiki/mw-config. This configures (or updates) the wiki and creates /srv/www/mediawiki/webroot/LocalSettings.php
  • Make sure LocalSettings.php uses line '$wgScriptPath = "/mediawiki";' and that path matches with the ALIAS used by apache
  • Now comment out the ALIAS for mw-config and restart apache

Personalize

One of the few things I changed was the logo. Edit $wgLogo in LocalSettings.php

$wgLogo = "$wgResourceBasePath/images/Jobapedia.png";

This will use /srv/www/mediawiki/webroot/images/Jobapedia.png as a logo.

Old Stuff

Im Rahmen des OpenSuse 10.2 -> 10.3 Upgrades wurden auch neue Versionen von MySQL und MediaWiki eingespielt. Zur Inbetriebnahme musste nur noch ein MediaWiki Upgrade Skript ausgeführt werden:

1) Admin-Zugang zu MySQL DB einrichten (User joachim reicht dafür nicht)

cd /srv/www/htdocs/mediawiki
cp AdminSettings.sample AdminSettings.php
vi AdminSettings.php (user=root, pw=a...)

2) Upgrade Skript ausführen

cd /srv/www/htdocs/mediawiki/maintenance
php update.php

Bei der Neuinstallation von OpenSuse 11.0 musste vorher zusätzlich folgendes getan werden:

  • Kopieren von /srv/www/htdocs/mediawiki
  • Kopieren von /var/lib/mysql
  • Automatischer Neustart von Mysql und Apache2