MediaWiki: Difference between revisions

From FlowerHouseWiki
Tag: Manual revert
 
(2 intermediate revisions by the same user not shown)
Line 15: Line 15:
== Update Script ==
== Update Script ==
<p>Bash script to update phpMyAdmin:</p>
<p>Bash script to update phpMyAdmin:</p>
<syntaxhighlight lang="bash" line>                                              
<syntaxhighlight lang="bash" line>
  GNU nano 5.4                                      UpdateMediaWiki.sh                                               
#!/bin/bash
#!/bin/bash


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

Latest revision as of 00:23, 22 February 2022

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 "-------------------------------------------------------------------------------------------"