Your Own Minecraft Server on a Linode VPS
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Your Own Minecraft Server on a Linode VPS

on

  • 688 views

 

Statistics

Views

Total Views
688
Views on SlideShare
688
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Your Own Minecraft Server on a Linode VPS Document Transcript

  • 1. Your Own Minecraft Server on a Linode VPS#Danols Minecraft Server propertiesallow-nether=truelevel-name=worldenable-query=falseallow-flight=falseserver-port=25565level-type=DEFAULTenable-rcon=falselevel-seed=Artomix #ht tp://seedhunter.blogspot.com/2012/03/jungle-island.htmlserver-ip=max-build-height=256spawn-npcs=truewhite-list=falsespawn-animals=trueonline-mode=truepvp=truedifficulty=3gamemode=0max-players=6spawn-monsters=truegenerate-structures=trueview-distance=10motd=you must surviveAutomatic StartupCompared that what is posted on the Minecraft Wiki the below is a simple startup script usingDebians/Ubuntus start-stop-deamon utility, it does not have the update server, or run filesystem in memory option; in my opinion Java+Linux do a good job system caching ondemand and any speeds from running in memoryThe server is run under user minecraft-server and group daemon to increase security - thisaccount and group is created as follows:# useradd --home-dir /usr/local/minecraft-server --no-create-home -gdaemon --shell /bin/false minecraft-server# groupadd daemonCreate the startup script as follows# cd /etc/init.d/# touch minecraft-server
  • 2. # chmod +x minecraft-serverPaste the following code into the script and make sure to modify the DAEMON_ARGS settingto reflect your memory allocation.#!/bin/bash### BEGIN INIT INFO# Provides: minecraft_server# Required-Start: $local_fs $remote_fs $network# Required-Stop: $local_fs $remote_fs $network# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Description: Minecraft server debian init script.# Author: Daniel Sokolowski#### END INIT INFO# You can use this as a template or symbolic link it into`/etc/init.d` on Debian system# PATH should only include /usr/* if it runs after the mountnfs.shscriptPATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/binDESC="Minecraft Server"NAME=minecraft_server.jarSCREENNAME=minecraft-server # the session screen game givenDAEMON="/usr/bin/screen"DAEMONUSER=minecraft-serverDAEMONGROUP=daemon# the -Xincgc options enable incremental garbage collector whichslows# execution but makes more memory efficient.# -Xmx1024M is the recommended minimumAs a last resort, sleep for some time.## Function that stops the daemon/service#do_stop()# Return# 0 if daemon has been stopped
  • 3. # 1 if daemon was already stopped# 2 if daemon could not be stopped# other if a failure occurredstart-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile$PIDFILERETVAL="$?"[ "$RETVAL" = 2 ] && return 2# Wait for children to finish too if this is a daemon that forks# and if the daemon is only ever run from this initscript.# If the above conditions are not satisfied then add some other code# that waits for the process to drop all resources that could be# needed by services started subsequently. A last resort is to# sleep for some time.start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec$DAEMON[ "$?" = 2 ] && return 2# Many daemons dont delete their pidfiles when they exit.rm -f $PIDFILEsleep 5sreturn "$RETVAL"## Function that sends a SIGHUP to the daemon/service#do_reload()## If the daemon can reload its configuration without
  • 4. # restarting (for example, when it is sent a SIGHUP),# then implement that here.#start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAMEreturn 0case "$1" inherobrine, factions