I recently wrote an installer for installing a ready-to-start Minecraft server optimized for Haphost VPS'. This script has only been tested on Ubuntu 14.10. It will probably only work on Debian and Ubuntu.
What the installer does:
The installer first will check if you have wget, screen and default-jre installed and will install them if not done already. wget is for downloading necessary files, screen is for running the server in the background and default-jre is necessary for the Minecraft server to run. After this, the script will check whether you run a 32bit or 64bit operating system and will then install the proper version of jq, if not installed yet. jq is needed to fetch the latest version of the Minecraft server. After the newest version of the Minecraft server is downloaded, it will then create two scripts to start and stop the server easily. By using this installer you accept the Minecraft EULA.
How to use the script:
Just copy and paste this command in the directory you would like to install the server. Make sure you are logged in as root or have sudo permissions. You may be asked for your user password to install certain dependencies such as wget, screen, default-jre or jq.
wget https://code.isaak.li/haphost/minecraft/vanilla/install.sh && chmod +x install.sh && ./install.sh
wget http://code.isaak.li/haphost/minecraft/craftbukkit/install.sh && chmod +x install.sh && ./install.sh
wget http://code.isaak.li/haphost/minecraft/spigot/install.sh && chmod +x install.sh && ./install.sh
As I already said, the installer creates two scripts to start and stop the server. You can run them with
If your Minecraft server is running and you want to switch to its console, run this command:
screen -r minecraft
To leave the console again, just press [CTRL] + [A] + [D] on your keyboard.
If you still have questions, don't hesitate to comment this thread or write me a private message.