CMS/MediaWiki: Unterschied zwischen den Versionen

Aus Dokument
Zur Navigation springen Zur Suche springen
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 46: Zeile 46:
  git commit -m "Backup"
  git commit -m "Backup"
  git push</code>
  git push</code>
==Wiederherstellen==


----
----
''Hinweis: Diese Inhalte wurden mit Unterstützung von Künstlicher Intelligenz erstellt und redaktionell überprüft (Transparenzhinweis gemäß Art. 50 EU AI Act).''
''Hinweis: Diese Inhalte wurden mit Unterstützung von Künstlicher Intelligenz erstellt und redaktionell überprüft (Transparenzhinweis gemäß Art. 50 EU AI Act).''

Version vom 17. Januar 2026, 01:49 Uhr

Hinweis: Diese Inhalte wurden mit Unterstützung von Künstlicher Intelligenz erstellt und redaktionell überprüft (Transparenzhinweis gemäß Art. 50 EU AI Act).


Postgres Datenbank erstellen

sudo -u postgres -i
createdb -E UTF8 -O thorsten mediawiki
psql -d mediawiki -c "GRANT ALL PRIVILEGES ON DATABASE mediawiki TO thorsten

exit

PHP installieren

sudo apt install php-fpm php-pgsql php-xml php-curl php-gd php-mbstring php-xmlrpc php-xmlrpc php-zip php-intl -y

Mediawiki installieren

cd /var/www
sudo git clone https://gerrit.wikimedia.org/r/mediawiki/core.git mediawiki
sudo cd mediawiki
sudo git tag -l | sort -V
sudo git checkout 1.41.0
sudo git submodule update --init --recursive
sudo chown -R www-data:www-data /var/www/mediawiki
sudo chmod -R 755 /var/www/mediawiki

Hochladen der Konfiguration

sudo scp /home/thorsten/Downloads/LocalSettings.php thorsten@ahrensburg.city:/var/www/mediawiki/LocalSettings.php

Lesbare URLs konfiguriern in mediawiki

sudo nano /var/www/mediawiki/LocalSettings.php
$wgScriptPath = "";
$wgArticlePath = "/$1";
$wgUsePathInfo = true;


Backup erstellen

cd /home/thorsten
gh repo clone thorstenkloehn/Download
sudo chmod 777 -R Download
cd /home/thorsten/Download
sudo rm /home/thorsten/Download/pagedump.xml
sudo rm /home/thorsten/Download/doc.xml
ssh thorsten@ahrensburg.city "php /var/www/mediawiki/maintenance/dumpBackup.php --full" > /home/thorsten/Download/pagedump.xml
ssh thorsten@ahrensburg.city "php /var/www/docs/maintenance/dumpBackup.php --full" > /home/thorsten/Download/doc.xml
git add pagedump.xml
git add doc.xml
git commit -m "Backup"
git push

Wiederherstellen


Hinweis: Diese Inhalte wurden mit Unterstützung von Künstlicher Intelligenz erstellt und redaktionell überprüft (Transparenzhinweis gemäß Art. 50 EU AI Act).