Monday, October 22, 2012

Installation Of Minecraft Server on Linux

What is Minecraft Server?

Minecraft servers allow players to play online games with other people. They may either be run on a hosted Minecraft server service, a dedicated server, a Virtual Private Server or a home machine.

Steps

1.Installing Java
To check if Java has been installed type the following into the terminal:
which java
If not you will need to install it, the following will install Java-JDK 1.6:

yum install java-1.6.0-openjdk

2.mkdir minecraft

3.cd minecraft

4.Time to get Minecraft:
  wget http://www.minecraft.net/download/minecraft_server.jar

5.Once it has finished downloading you will need to make sure Minecraft has the correct permissions:

chmod +x minecraft_server.jar

6.Launching Minecraft
Launching the Minecraft server on a Linux server is different from launching on a Windows based server because when you close the SSH terminal Minecraft will also close. To get around this we will need to install "screen" which will keep the Minecraft server running after the SSH terminal is closed. To install screen:

yum install screen

Now that screen is installed we will use it run the server:

screen

Starting up Minecraft now:
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
(*1024 value can be changed depending on how much RAM your VPS has)
Ex. 512MB VPS - java -Xmx512M -Xms512M -jar minecraft_server.jar nogui
Ex. 2048MB VPS - java -Xmx2048M -Xms2048M -jar minecraft_server.jar nogui

Your Minecraft server is now up and running and you will be able to play with all your friends.

No comments:

Post a Comment