Minecraft Immie Pi: Difference between revisions

From miki
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 3: Line 3:
== System and server ==
== System and server ==


* Running on '''Raspberry Pi''', with 512MB RAM.
* <s>Running on '''Raspberry Pi''', with 512MB RAM.</s>
* For now, running on '''Zotac ID-42''', ''xbmcbuntu'', with 4096MB RAM.

* Using Raspbian image 2014-06-20. Java pre-installed:
* Using Raspbian image 2014-06-20. Java pre-installed:
$ java -version
$ java -version
Line 12: Line 14:
wget http://ci.md-5.net/job/Spigot/lastStableBuild/artifact/Spigot-Server/target/spigot.jar
wget http://ci.md-5.net/job/Spigot/lastStableBuild/artifact/Spigot-Server/target/spigot.jar
sudo java -Xms256M -Xmx496M -XX:MaxPermSize=128M -jar /home/pi/mc/spigot.jar nogui
sudo java -Xms256M -Xmx496M -XX:MaxPermSize=128M -jar /home/pi/mc/spigot.jar nogui
* Now, running Cauldron + Forge server 1.7.2 1.1147.04.107 (to run Mo'Creatures mo)
wget http://adf.ly/901609/http://files.minecraftforge.net/maven/net/minecraftforge/cauldron/1.7.2-1.1147.04.107/cauldron-1.7.2-1.1147.04.107-installer.jar
* Make sure to remove the binding '''dynamic-complete-history''' in the {{file|.inputrc}} file, or this will trigger the following error at launch:
* Make sure to remove the binding '''dynamic-complete-history''' in the {{file|.inputrc}} file, or this will trigger the following error at launch:
SEVERE: Failed to start the minecraft server
SEVERE: Failed to start the minecraft server
Line 42: Line 46:
#
#
# m h dom mon dow command (dow=0|7 is sunday)
# m h dom mon dow command (dow=0|7 is sunday)
@reboot /usr/bin/tmux -c ~mc/mc/startonboot.sh
@reboot /usr/bin/tmux new-session -d ~mc/mc/startonboot.sh
</source>
</source>
:file {{file|~mc/mc/startonboot.sh}}:
:file {{file|~mc/mc/startonboot.sh}}:
Line 51: Line 55:


cd ~/mc
cd ~/mc

echo "========================================================================="
echo "STARTING SERVER - WAITING FOR 20 SECONDS"
echo "-------------------------------------------------------------------------"
sleep 20
echo "Waited 20s. Updating GIT repository..."
git add -A
git commit -m "udpate on $HOSTNAME"
echo "Done. Starting the server..."
echo "========================================================================="

while : ; do
while : ; do
# Start spigot
# Start spigot
java -Xms1024M -Xmx1024M -XX:MaxPermSize=256M -jar ~/mc/spigot.jar nogui
java -Xms1024M -Xmx1024M -XX:MaxPermSize=256M -jar ~/mc/spigot.jar nogui
# Sleep 5 sec - can be broken here. Note that normally spigot restart itself on crash, but not on stop
# Sleep 5 sec - can be broken here. Note that normally spigot restart itself on crash, but not on stop
echo
echo "========================================================================="
echo "========================================================================="
echo "Server stopped. Sleeping 5 SECONDS before restarting... (Ctrl-C to break)"
echo "========================================================================="
echo "========================================================================="
sleep 5
sleep 5
done
done
Line 73: Line 94:
* On remote ssh server, restrict access to ssh porwarding on appropriate ports, file {{file|.authorized_keys}}:
* On remote ssh server, restrict access to ssh porwarding on appropriate ports, file {{file|.authorized_keys}}:
no-pty,no-X11-forwarding,permitopen="localhost:54899",permitopen="localhost:54900",command="/bin/echo do-not-send-commands" ssh-rsa PUBLIC_KEY_HERE mc@immie.org
no-pty,no-X11-forwarding,permitopen="localhost:54899",permitopen="localhost:54900",command="/bin/echo do-not-send-commands" ssh-rsa PUBLIC_KEY_HERE mc@immie.org
* disable online authentication:
online-mode: false


== Plugins ==
== Plugins ==
Line 94: Line 117:
* [http://dev.bukkit.org/bukkit-plugins/lockette/ Lockette]
* [http://dev.bukkit.org/bukkit-plugins/lockette/ Lockette]
* [http://dev.bukkit.org/bukkit-plugins/multiverse-core/ Multiverse-Core]
* [http://dev.bukkit.org/bukkit-plugins/multiverse-core/ Multiverse-Core]
* [http://dev.bukkit.org/bukkit-plugins/multiverse-netherportals/ Multiverse-NetherPortals]
** [http://dev.bukkit.org/bukkit-plugins/multiverse-netherportals/ Multiverse-NetherPortals]
* [http://dev.bukkit.org/bukkit-plugins/multiverse-portals/ Multiverse-Portals]
** [http://dev.bukkit.org/bukkit-plugins/multiverse-portals/ Multiverse-Portals]
* [http://dev.bukkit.org/bukkit-plugins/multiverse-signportals/ Multiverse-SignPortals]
** [http://dev.bukkit.org/bukkit-plugins/multiverse-signportals/ Multiverse-SignPortals]
:Set difficulty to peaceful in world
/mvtp world
/mvmodify set difficulty PEACEFUL
/mvm set monsters false
:Import single player world ''Papa - first survival''. First copy solo files to folder {{file|~/world_papa_first_survival}}. Then in the server:
/mv import papa_first_survival NORMAL
:Import other worlds in a same way
/mv import zyra_eco NORMAL
/mv import emma_creatif2 NORMAL # For this one, I had to type /fml confirm in the console

* [http://dev.bukkit.org/bukkit-plugins/vault/ Vault]
* [http://dev.bukkit.org/bukkit-plugins/vault/ Vault]
* [http://dev.bukkit.org/bukkit-plugins/worldedit/ WorldEdit]
* [http://dev.bukkit.org/bukkit-plugins/worldedit/ WorldEdit]

Latest revision as of 23:31, 23 July 2014

Minecraft Immie Pi is our tiny home minecraft server running on the Pi.

System and server

  • Running on Raspberry Pi, with 512MB RAM.
  • For now, running on Zotac ID-42, xbmcbuntu, with 4096MB RAM.
  • Using Raspbian image 2014-06-20. Java pre-installed:
$ java -version
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) Client VM (build 24.0-b56, mixed mode)
  • Server Spigot 1.7.10
wget http://ci.md-5.net/job/Spigot/lastStableBuild/artifact/Spigot-Server/target/spigot.jar
sudo java -Xms256M -Xmx496M -XX:MaxPermSize=128M -jar /home/pi/mc/spigot.jar nogui
  • Now, running Cauldron + Forge server 1.7.2 1.1147.04.107 (to run Mo'Creatures mo)
wget http://adf.ly/901609/http://files.minecraftforge.net/maven/net/minecraftforge/cauldron/1.7.2-1.1147.04.107/cauldron-1.7.2-1.1147.04.107-installer.jar
  • Make sure to remove the binding dynamic-complete-history in the .inputrc file, or this will trigger the following error at launch:
SEVERE: Failed to start the minecraft server
java.lang.IllegalArgumentException: No enum constant org.bukkit.craftbukkit.libs.jline.console.Operation.DYNAMIC_COMPLETE_HISTORY
	at java.lang.Enum.valueOf(Enum.java:236)
  • Set crontab script to start spigot server automatically at boot.
crontab -l:
# Crontab
#
# Install this crontab with
#
#   sed -r '/^#/!s/\$USER/'$USER'/g' crontab-minecraft | crontab
#
#   !!! THIS WILL OVERWRITE ANY CURRENT CRONTAB !!!
#
# Or append only job to current crontab
#
#   ( crontab -l; sed -r '$!d;s/\$USER/'$USER'/g' crontab-minecraft ) | crontab
#
# Use /bin/bash to run commands, instead of the default /bin/sh
SHELL=/bin/bash
# Define variable USER because we need it in our job scripts
USER=mc
# Mail any output to '$USER', no matter whose crontab this is
MAILTO=mc
# Set PATH - by default it is set to /usr/bin:/bin
PATH=/home/mc/bin:/usr/local/bin:/usr/bin:/bin
#
#
# m h dom mon dow   command     (dow=0|7 is sunday)
@reboot         /usr/bin/tmux new-session -d ~mc/mc/startonboot.sh
file ~mc/mc/startonboot.sh:
#! /bin/bash

~/bin/autonoekeon.sh

cd ~/mc

echo "========================================================================="
echo "STARTING SERVER - WAITING FOR 20 SECONDS"
echo "-------------------------------------------------------------------------"
sleep 20
echo "Waited 20s. Updating GIT repository..."
git add -A
git commit -m "udpate on $HOSTNAME"
echo "Done. Starting the server..."
echo "========================================================================="

while : ; do
    # Start spigot
    java -Xms1024M -Xmx1024M -XX:MaxPermSize=256M -jar ~/mc/spigot.jar nogui
    # Sleep 5 sec - can be broken here. Note that normally spigot restart itself on crash, but not on stop
    echo 
    echo "========================================================================="
    echo "========================================================================="
    echo "Server stopped. Sleeping 5 SECONDS before restarting... (Ctrl-C to break)"
    echo "========================================================================="
    echo "========================================================================="
    sleep 5
done
file ~/bin/autonoekeon.sh:
#! /bin/bash

case $HOSTNAME in
    "xbmcbuntu")    PORT=54899;;
    "mcpi")         PORT=54900;;
    "reddragon")    PORT=54895;;
        *)          PORT=54896;;
esac

autossh -M 0 -f -T -N -n -q -R $PORT:localhost:22 noekeon
  • On remote ssh server, restrict access to ssh porwarding on appropriate ports, file .authorized_keys:
no-pty,no-X11-forwarding,permitopen="localhost:54899",permitopen="localhost:54900",command="/bin/echo do-not-send-commands" ssh-rsa PUBLIC_KEY_HERE mc@immie.org
  • disable online authentication:
online-mode: false

Plugins

Installed
  • ClearLag (suggested on HowToGeek, Jason Fitzpatrick [1])
  • NoSpawnChunks (suggested on HowToGeek, Jason Fitzpatrick [2])
Installed - was installed on Jerome's server
Set difficulty to peaceful in world
/mvtp world
/mvmodify set difficulty PEACEFUL
/mvm set monsters false
Import single player world Papa - first survival. First copy solo files to folder ~/world_papa_first_survival. Then in the server:
/mv import papa_first_survival NORMAL
Import other worlds in a same way
/mv import zyra_eco NORMAL
/mv import emma_creatif2 NORMAL          # For this one, I had to type /fml confirm in the console
To consider installing
To consider installing - was installed on Jerome's server
  • [nolink AntiBotUltra]
  • [nolink ChestShop]
  • [nolink Citizens]
  • [nolink CityWorld]
  • [nolink Command iConomy]
  • [nolink CoreProtect]
  • [nolink CrackShot]
  • [nolink Factions]
  • [nolink GroupManager] (was is it? redundant with essentials' version?)
  • [nolink iDisguise]
  • [nolink LogManager_0.1.3]
  • Multiverse-Inventories
  • [nolink NoCheatPlus]
  • [nolink Openinv]
  • [nolink PlayerHeads]
  • PlotMe
  • [nolink PluginMetrics]
  • [nolink Timeismoney]
  • [nolink update]
  • [nolink xAuth]