Last active
March 1, 2016 07:08
-
-
Save Sonictherocketman/221c6fad8ea76657d2b2 to your computer and use it in GitHub Desktop.
Set up a Minecraft server on a blank Linode instance.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Set up a Minecraft server on a blank Linode instance. | |
# Usage: | |
# $ wget https://gist.githubusercontent.com/Sonictherocketman/221c6fad8ea76657d2b2/raw/1b565e1b5ed8b8b38efbf6d987da8986666857b8/install_mc_server.sh | |
# $ sh install_mc_server <version> | |
# | |
# author: Brian Schrader | |
# since: 2016-02-29 | |
set -e | |
VERSION=$1 | |
# Get everything setup | |
sudo apt-get install default-jre | |
mkdir mc-server && cd mc-server | |
wget "https://s3.amazonaws.com/Minecraft.Download/versions/$VERSION/minecraft_server.$VERSION.jar" | |
# Initial Startup | |
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui | |
# Accept the license agreement | |
cat eula.txt | sed 's/false/true/g' > eula.txt | |
# Start up the server for reals | |
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment