Skip to content

Instantly share code, notes, and snippets.

@alvinl
Created December 14, 2012 03:14
Show Gist options
  • Save alvinl/4282411 to your computer and use it in GitHub Desktop.
Save alvinl/4282411 to your computer and use it in GitHub Desktop.
Minecraft server install script
#!/bin/bash
# Minecraft install script
apt-get update
apt-get install screen -y
wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk-7u3-download-1501626.html;" http://download.oracle.com/otn-pub/java/jdk/7u9-b05/jdk-7u9-linux-i586.tar.gz
mkdir /usr/lib/jvm/
tar -zxvf jdk-7u9-linux-i586.tar.gz -C /usr/lib/jvm/
rm jdk-7u9-linux-i586.tar.gz
update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_09/bin/java 1065
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_09/bin/javac 1065
mkdir minecraft
wget -P minecraft/ https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar
wget -P minecraft/ http://alvinl.com/s/start.sh
chmod +x minecraft/start.sh
clear
echo "Server has been installed."
@ruunex
Copy link

ruunex commented Aug 31, 2013

go be useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment