MediaWiki

From FlowerHouseWiki
Mediawiki.jpg

Network


IP: 192.168.88.14
MAC: 5E:3E:A5:3C:B4:80
Domain: wiki.flowerhouse.at

System


OS: Debian Bullseye
RAM: 512MB
Cores: 1

MediaWiki is reachable under 192.168.88.14 which is located in the ServerVLAN.

The subdomain is wiki.flowerhouse.at which is handled by the ReverseProxy.

Basic Setup

Update Script

Bash script to update phpMyAdmin:

#!/bin/bash

echo -e "-------------------------------------------------------------------------------------------"
echo -e "- Which version do you want to update to?"
echo -e "-------------------------------------------------------------------------------------------"

read version

echo -e "-------------------------------------------------------------------------------------------"
echo -e "- Update p4d to version ${version}?"
echo -e "-------------------------------------------------------------------------------------------"

echo -e -n "Continue? [y/N]"
echo ""
read -n 1 c

if [ "${c}" != "y" ]; then
    exit 0
fi

wget https://releases.wikimedia.org/mediawiki/1.37/mediawiki-${version}.tar.gz || exit 1
tar -xvf mediawiki-${version}.tar.gz || exit 1
rm mediawiki-${version}.tar.gz || exit 1
cp mediawiki-${version}/* /var/www/html/w/ -R || exit 1
rm -r mediawiki-${version} || exit 1
chown -R www-data:www-data /var/www/html/w || exit 1
chmod -R 775 /var/www/html/w || exit 1
systemctl restart apache2

echo -e "-------------------------------------------------------------------------------------------"
echo -e "- Update to version ${version} completed!"
echo -e "- Update database scheme with https://wiki.flowerhouse.at/mw-config                        "
echo -e "-------------------------------------------------------------------------------------------"