Want to setup a Minecraft Server and Java for you and your friends to play Minecraft on a CentOS Virtual Private Server (VPS). This tutorial will show you how to install Java and Minecraft Server on your CentOS VPS.
Using PuTTY or your favourite SSH client. You need to login as root on your VPS and do the following:
1. Installing Java:
yum install java-1.6.0-openjdk
2. Next install screen. This will allow your Minecraft Server to keep running even after you close the SSH client.
yum install screen
3. Next, make a directory for Minecraft to be installed in.
4. Now to change to that directory.
5. Now we can download the Minecraft Server app.
6. Next to make the server executable.
chmod +x minecraft_server.jar
7. Next, we’ll run screen and load minecraft up.
8. Now we’ll actually load up Minecraft Server.
java -Xmx512M -Xms512M -jar minecraft_server.jar nogui
NOTE: Replace 512M in -Xmx and -Xms with the amount of RAM you can allocate for Minecraft. The amount you have will depend on your VPS (check your VPS to see how much available RAM it is).
9. Leave screen by pressing Control + A + D on your Keyboard.
10. In the future, if you want to go back to screen and manage your minecraft server; connect back via SSH and press Control + R on your keyboard.
Having issues or have a suggestion? Drop them in the Comments section. I’ll answer back!