Minecraft Map-Presenter Setup
Installation auf Redhat / CentOS 7
System Abhängigkeiten nachinstallieren
Installation der benötigten Pakete:
# yum -y update # yum install numpy python-imaging git gcc python-imaging-devel python-pillow-devel
Overviewer einrichten
Installation / Kompilierung des Hauptprogramms:
# mkdir /opt/mapExtractor # cd /opt/mapExtractor # git clone https://github.com/overviewer/Minecraft-Overviewer.git # cd Minecraft-Overviewer # python setup.py build
Konfiguration des mapExtractors
# wget https://s3.amazonaws.com/Minecraft.Download/versions/1.12.2/1.12.2.jar -P /opt/mapExtractor/
# vim /opt/mapExtractor/export_conf
worlds["world"] = "/opt/minecraft/world/" renders["world_day"] = { "world": "world", "title": "Genoni-Server Tag", "rendermode": smooth_lighting, "dimension": "overworld", } renders["world_night"] = { "world": "world", "title": "Genoni-Server Nacht", "rendermode": smooth_night, "dimension": "overworld", } renders["world_caves"] = { "world": "world", "title": "Genoni-Server Caves", "rendermode": cave, "dimension": "overworld", } renders["world_nether"] = { "world": "world", "title": "Genoni-Server Nether", "rendermode": nether_smooth_lighting, "dimension": "nether", } renders["world_nether_caves"] = { "world": "world", "title": "Genoni-Server Nether-Caves", "rendermode": cave, "dimension": "nether", } outputdir = "/var/www/html/" texturepath = "/opt/mapExtractor/1.12.2.jar"
# vim /opt/mapExtractor/index.html
<meta http-equiv="refresh" content="0; URL=/minecraft/view.html">
Skript zum Ausführen des mapExtractors
# vim /opt/mapExtractor/perform_mapExtraction.sh
#! /bin/bash newest_client_version=$(curl https://minecraft.net/en-us/download/server | grep https://s3.amazonaws.com/Minecraft.Download/versions/.*/minecraft_server.*.jar | cut -d '/' -f6) client_version_file=$(ls /opt/mapExtractor | grep *.jar) in_use_client_version=${client_version_file::-4} echo $in_use_client_version echo $newest_client_version if [ $in_use_client_version == $newest_client_version ]; then echo "Client is up to date!" fi if [ $in_use_client_version != $newest_client_version ]; then echo "CLIENT NEEDS UPDATE!" rm -f /opt/mapExtractor/*.jar wget "https://s3.amazonaws.com/Minecraft.Download/versions/$newest_server_version/$newest_server_version.jar" -P /opt/mapExtractor/ sed -ri "s/\/opt\/mapExtractor\/(.*)\.jar/\/opt\/mapExtractor\/$newest_client_version.jar/" /opt/mapExtractor/export_conf fi cd /opt/mapExtractor/Minecraft-Overviewer/ ./overviewer.py -v --config=/opt/mapExtractor/export_conf if [ ! -f /var/www/html/view.html ]; then mv /var/www/html/index.html /var/www/html/view.html fi cp /opt/mapExtractor/index.html /var/www/html/ chown -R apache:apache /var/www/html/
# chown -R mcuser:mcuser /opt/mapExtractor # chmod +x /opt/mapExtractor/perform_mapExtraction.sh
# /opt/mapExtractor/./perform_mapExtraction.sh
ACHTUNG: Am Schluss unter: /opt/mapExtractor/view.html
einen Google Maps API-key
hinterlegen!