mrheisenberg
Goto Top

MediaWiki Installationsprobleme

Moin Leute,

ich hab mich mal über die Installation von MediaWiki gewagt, MariaDB, PHP und Apache laufen, die Datenbank in MariaDB ist erstellt, und aus meiner Sicht funktioniert diese auch:

+--------------------+
| Database           |
+--------------------+
| WikiDB2023         |
| information_schema |
| mysql              |
| performance_schema |
| ps_wiki            |
| sys                |
+--------------------+
6 rows in set (0,000 sec)

Erstellt hab ich die mit den Codezeilen:
(zugriff nicht mit dem root User)
CREATE USER 'USERNAME'@'localhost' IDENTIFIED BY 'PASSWORT';  
CREATE DATABASE WikiDB2023 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES ON WikiDB2023.* TO 'USERNAME'@'localhost';  
FLUSH PRIVILEGES;

Hier auch die LocalSettings.php :

<?php
# This file was automatically generated by the MediaWiki 1.30.0
# installer. If you make manual changes, please keep track in case you
# need to recreate them later.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_  
# file, not there.
#
# Further documentation for configuration settings may be found at:
# https://www.mediawiki.org/wiki/Manual:Configuration_settings

# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {  
	exit;
}

## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;

$wgSitename = "XXXXXXXXXX";  
$wgMetaNamespace = "XXXXXXXXXX";  

## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
## https://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "/wiki";  

## The protocol and server name to use in fully-qualified URLs
$wgServer = "http://XXXXXXXXXX";  

## The URL path to static resources (images, scripts, etc.)
$wgResourceBasePath = $wgScriptPath;

## The URL path to the logo.  Make sure you change this from the default,
## or else you'll overwrite your logo when you upgrade!  
$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";  

## UPO means: this is also a user preference option

$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO

$wgEmergencyContact = "apache@XXXXXXXXXX";  
$wgPasswordSender = "apache@XXXXXXXXXX";  

$wgEnotifUserTalk = false; # UPO
$wgEnotifWatchlist = false; # UPO
$wgEmailAuthentication = true;

## Database settings
$wgDBtype = "mysql";  
$wgDBserver = "localhost";  
$wgDBname = "WikiDB2023";  
$wgDBuser = "XXXXXXXXXX";  
$wgDBpassword = "XXXXXXXXXX";  

# MySQL specific settings
$wgDBprefix = "";  

# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";  

# Experimental charset support for MySQL 5.0.
$wgDBmysql5 = false;

## Shared memory settings
$wgMainCacheType = CACHE_ACCEL;
$wgMemCachedServers = [];

## To enable image uploads, make sure the 'images' directory  
## is writable, then set this to true:
$wgEnableUploads = true;
#$wgUseImageMagick = true;
#$wgImageMagickConvertCommand = "/usr/bin/convert";  

# InstantCommons allows wiki to use images from https://commons.wikimedia.org
$wgUseInstantCommons = false;

# Periodically send a pingback to https://www.mediawiki.org/ with basic data
# about this MediaWiki instance. The Wikimedia Foundation shares this data
# with MediaWiki developers to help guide future development efforts.
$wgPingback = false;

## If you use ImageMagick (or any other shell command) on a
## Linux server, this will need to be set to the name of an
## available UTF-8 locale
$wgShellLocale = "de_DE.utf8";  

## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publically accessible from the web.
#$wgCacheDirectory = "$IP/cache";  

# Site language code, should be one of the list in ./languages/data/Names.php
$wgLanguageCode = "de";  

$wgSecretKey = "XXXXXXXXXX";  

# Changing this will log out all existing sessions.
$wgAuthenticationTokenVersion = "1";  

# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = "XXXXXXXXXX";  

## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright  
$wgRightsUrl = "";  
$wgRightsText = "";  
$wgRightsIcon = "";  

# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "/usr/bin/diff3";  

## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'vector', 'monobook':  
$wgDefaultSkin = "vector";  

# Enabled skins.
# The following skins were automatically enabled:
wfLoadSkin( 'CologneBlue' );  
wfLoadSkin( 'Modern' );  
wfLoadSkin( 'MonoBook' );  
wfLoadSkin( 'Vector' );  


# Enabled extensions. Most of the extensions are enabled by adding
# wfLoadExtensions('ExtensionName');  
# to LocalSettings.php. Check specific extension documentation for more details.
# The following extensions were automatically enabled:
wfLoadExtension( 'Cite' );  
wfLoadExtension( 'CiteThisPage' );  
wfLoadExtension( 'Gadgets' );  
wfLoadExtension( 'ImageMap' );  
wfLoadExtension( 'InputBox' );  
wfLoadExtension( 'Interwiki' );  
wfLoadExtension( 'Nuke' );  
wfLoadExtension( 'ParserFunctions' );  
wfLoadExtension( 'PdfHandler' );  
wfLoadExtension( 'Renameuser' );  
wfLoadExtension( 'SpamBlacklist' );  
wfLoadExtension( 'SyntaxHighlight_GeSHi' );  
wfLoadExtension( 'TitleBlacklist' );  
wfLoadExtension( 'WikiEditor' );  


# End of automatically generated settings.
# Add more configuration options below.

Jetzt bringt mir der sobald ich eine neue Seite erstellen möchte einen " Fataler Ausnahmefehler des Typs „TypeError“ "

Die Einrichtung hat geklappt, es wurde auch alles soweit Konfiguriert und ich komme auf die Startseite, jetzt ist meine Vermutung dass ich irgendwo in der DB einen Fehler habe, da wenn ich nicht komplett falsch liege eine neue Seite in die DB kommt und dann über den Querverweis abruf/aufrufbar ist, meine DB-Kenntnisse lassen zu wünschen Übrig....

Mit folgenden Befehlen hab ich dann die Komponenten unter dem Terminal heruntergeladen, jeweils als root (SU) User:

apt update -y
sudo apt upgrade

sudo apt update
sudo apt install apache2
sudo ufw app list
sudo ufw allow 'Apache'  
sudo ufw status
sudo systemctl status apache2 --> Apache Webserver ist Online

sudo apt install php
sudo apt install texlive
sudo apt install php-mbstring
sudo apt install php-xml
sudo apt install php-apcu
sudo apt install php-horde-cache     ---> hier kam eine Fehlermeldung : 

root@ubuntuwiki:/home/XXXXXX# sudo apt install php-horde-cache
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
E: Paket php-horde-cache kann nicht gefunden werden.

wget https://releases.wikimedia.org/mediawiki/1.30/mediawiki-1.30.0.tar.gz
sudo gunzip mediawiki-1.30.0.tar.gz
sudo tar -xvf mediawiki-1.30.0.tar.gz
sudo mv mediawiki-1.30.0/* /var/www/html/wiki/


Beim Entpacken kam wieder ein Fehler, da /wiki/ nicht vorhanden war, wurde über diesen Befehlt erstellt
sudo mkdir -p /var/www/html/wiki/


Danach funktionierte auch das Entpacken ins Verzeichnis.

MariaDB wurde installiert

sudo apt-get install mariadb-client mariadb-server

Und auch entsprechend wie oben erwähnt Konfiguriert:

CREATE USER 'USERNAME'@'localhost' IDENTIFIED BY 'PASSWORT';  
CREATE DATABASE WikiDB2023 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES ON WikiDB2023.* TO 'USERNAME'@'localhost';  
FLUSH PRIVILEGES;

Danach reboot des Apache Servers:

sudo service apache2 restart

Hatte dann Probleme beim Wiki mit der DB-Verbindung:

"Es konnte kein adäquater Datenbanktreiber gefunden werden. Es muss daher ein Datenbanktreiber für PHP installiert werden. Die folgenden Datenbanksysteme werden unterstützt: MySQL (oder kompatible Datenbanksysteme), PostgreSQL, Oracle, Microsoft SQL Server, SQLite

Wenn du PHP selbst kompiliert hast, konfiguriere es erneut mit einem aktivierten Datenbankclient, zum Beispiel durch Verwendung von ./configure --with-mysqli. Wenn du PHP von einem Debian- oder Ubuntu-Paket installiert hast, dann musst du auch beispielsweise das php5-mysql-Paket installieren."

habe danach etwas gegoogelt und dann mit folgenden Befehlen die mySQL erstellt:

sudo apt update
sudo apt install php-mysql

Apache reboot:

sudo systemctl restart apache2

Dann wurde im Wiki auf der Weboberfläche angezeigt dass die Einrichtung mit der DB erfolgreich war, ich habe dann noch ein paar Erweiterungen installiert:

Cite
CiteThisPage
ConfirmEdit
Gadgets
ImageMap
InputBox
Interwiki
Nuke
ParserFunctions
PdfHandler
Renameuser
SpamBlacklist
SyntaxHighlight_GeSHi
TitleBlacklist
WikiEditor

Und jetzt kommt der Fehler.... ich hab keine Idee wo ich Ansetzen kann/soll , die "localSetting.php" liegt im root Verzeichnis sowie in diesen:

PS C:\Windows\system32> scp "C:\Users\XXXX\Downloads\LocalSettings.php" adminpr@10.10.58.56:/var/www/html/  
XXXX@XXXX's password:  
LocalSettings.php                                                                     100% 5108   868.6KB/s   00:00
PS C:\Windows\system32> scp "C:\Users\XXXX\Downloads\LocalSettings.php" adminpr@10.10.58.56:/var/www/html/wiki/  
XXXX@XXXX's password:  
LocalSettings.php                                                                     100% 5108     1.0MB/s   00:00
PS C:\Windows\system32> scp "C:\Users\XXXX\Downloads\LocalSettings.php" XXXX@10.10.58.56:/var/www/html/wiki/includes\  
XXXX@'s password:  
LocalSettings.php                                                                     100% 5108     1.3MB/s   00:00
PS C:\Windows\system32> scp "C:\Users\XXXX\Downloads\LocalSettings.php" XXXX@XXXX:/var/www/html/wiki/skins/  
XXXX@XXXX's password:  
LocalSettings.php                                                                     100% 5108     1.2MB/s   00:00

Ich verzweifle langsam, wenn eine Info abgeht, bitte lasst´s mich wissen, es kann sicher nur eine Kleinigkeit (i hope) sein, aber mit meinem Linux Wissen ist´s nun vorbei


Grüße

PS läuft auf Ubuntu 23.4
PHP:
HP 8.1.12-1ubuntu4.2 (cli) (built: Jun 28 2023 13:56:12) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.12, Copyright (c) Zend Technologies
with Zend OPcache v8.1.12-1ubuntu4.2, Copyright (c), by Zend Technologies

Content-Key: 7967867738

Url: https://administrator.de/contentid/7967867738

Printed on: April 27, 2024 at 13:04 o'clock

Member: nachgefragt
nachgefragt Jul 27, 2023 at 11:19:52 (UTC)
Goto Top
Du solltest doch Bookstack nehmen face-wink
Mitglied: 6376382705
6376382705 Jul 27, 2023 updated at 11:43:02 (UTC)
Goto Top
Hi.

Ich hätte mir vorher die Doku von Wikimedia angeschaut und zuerst die aktuelle Version heruntergeladen/installiert. Derzeit 1.40.0.

Kollege @7907292512 hat auch einen wichtigen Aspekt gepostet, der in der Doku steht. Du solltest erst lesen, dann verstehen, dann umsetzen. :/

Dann retry. (nach Doku)

Kann bestätigen, dass das problemlos wuppt.

php5-mysql-Paket
klingt auch gnadenlos falsch und veraltet. PHP 8.x ist aktuell und sollte dringend genutzt werden.

To users of MediaWiki versions version 1.36-1.38 and 1.34 and earlier: These versions are no longer supported. Please update to a newer version of MediaWiki.

Ohh diggi face-smile

Gruß

Bei derart viel Text(nebenbei: gut beschrieben!) den der TO geschrieben hat, wäre die Doku 7x durchgelesen face-sad
Mitglied: 7907292512
7907292512 Jul 27, 2023 updated at 11:49:07 (UTC)
Goto Top
Zitat von @6376382705:
ich hätte mir vorher die Doku von Wikimedia angeschaut und zuerst die aktuellste Version versucht zu installieren.
Erst recht wenn man mit PHP 8.1 unterwegs ist ...
https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Installation_re ...
If using PHP8, we recommend using MediaWiki 1.38.4+ or 1.39.0+. PHP8 is not in use by Wikimedia wikis, and thus gets less testing, but other groups do use MediaWiki with PHP8 without issue. If you encounter any bugs when using MediaWiki with PHP8, please report them. See task T248925 for more information.

RTFM führt wie immer erfolgreich zum Ziel, dann braucht man auch keine Romane darüber schreiben.

Gruß siddius
Member: MrHeisenberg
MrHeisenberg Jul 27, 2023 at 12:09:28 (UTC)
Goto Top
Danke für die ersten Rückmeldungen, ich gestehe zu meiner Schande, mit Linux hab ich keine Erfahrungen, deswegen hat mir diese Anleitung irrsinnig geholfen:

https://www.turbogeek.co.uk/how-to-install-mediawiki/

Ich hab auf der MediaWiki auch keine richtige Anleitung für LinuxDummies gefunden.... thats life, werd die Linuxhittn einstampfen und nochmal loslegen... hat ja bei SnipeIT auch geklappt
Mitglied: 6376382705
Solution 6376382705 Jul 27, 2023 updated at 18:21:00 (UTC)
Goto Top
mit Linux hab ich keine Erfahrungen
Das hat gar nichts mit Erfahrung mit einem OS zu tun. Deine Installation war ja im Grunde brauchbar.

Anleitung irrsinnig geholfen
Ich für meinen Teil habe folgende Erfahrung gemacht: Open Source Software haben häufig (vor allem wenns so bekannt und verbreitet ist wie WikiMedia) eine echt gute Dokumentation, direkt von den Devs/der Community selbst.

Sprich: zu erst auf der Homepage schauen, dann auf Github und wenns da nichts gibt, eine random Doku probieren.
Ich selbst arbeite viel in der OS Community, daher die Erfahrungen.

A&O:
Wiki/Doku lesen. Ratsam ist es auch, dass Du(wenn möglich) den Kram direkt via Github pullst
git clone [repolink]
, so schießt Du schließlich nur ein
git pull
und schon haste die aktuelle Version (hier in dem Fall auch möglich!) auf der Disk. (Changelog selbstverständlich vorab lesen)

Anleitung für LinuxDummies gefunden.... thats life
Ich halte die WikiMedia Doku für absolut brauchbar. Steht alles nötige drin. Nicht zu wenig, nicht zu viel. Einfacher gehts eigentlich fast nicht mehr (ausgeklammert: installationsscripte).

steht auch drin (step 3):
Check the Mediawiki website for the latest versions.

Lesen, nicht nur überfliegen und blind C&P

Viel Spass beim neu aufbauen (nimm das installscript von denen, da wird alles was benötigt wird, installiert und vorbereitet und via Asi durchgeleitet).
Das wird schon. -nach dem Projekt hast Du deutlich was gelernt, bin ich überzeugt von.

Gruß