Setting up a Minecraft server on a Linux VPS (CentOS)
AuthorAdrian McNab Article Reference NumberAA-00917 Views5884 0 Rating/ Voters

First Steps

The first step to setting up your own server on a Linux VPS is connecting to the Container. Logon to your Virtuozzo Power Panel, under the Services tab on the left side of the page you will find SSH Connection.

Image:Minecraft_Linux_1.jpg

Double click the link, The SSH window will pop up after the login and password are submitted.

Installing the Minecraft Server

Once the terminal has been launched, the first think you will want to do is check if Java is installed.

Installing Java

To check if Java has been installed type the following into the terminal:

which java

It should display the following if Java is installed:

/usr/bin/java

If not you will need to install it, the following will install Java-JDK 1.6:

yum install java-1.6.0-openjdk

Let it finish installing, and when its done check if Java was installed properly using the same command from before. Once Java has been installed correctly you can move on.

Installing the Server Files

Before you can install anything you will need somewhere to install it to. You will need to make a new directory for Minecraft:

mkdir minecraft

You will want to jump over to the newly created minecraft directory:

cd minecraft 

Time to get Minecraft:

wget http://www.minecraft.net/download/minecraft_server.jar

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

chmod +x minecraft_server.jar

Minecraft is now installed!

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, you can also configure the server property files.

Configuring the Minecraft Properties file

To do this you will need to enter the File Manger and navigate to the directory that you created earlier. The File Manager can be found on the left side of the Virtuozzo Power Panel, under the Management tab.

Image:Minecraft_Linux_3.jpg

You should be able to locate the directory that we created earlier in the "root" folder. The path directory should be something like:

/root/minecraft/

This is where all of the server files are located, to edit the server.properties file you can use the edit button in the Actions column.

Change the settings to you liking, if you do not know what each line controls you can look it up on the Official Minecraft Wiki. When you are done save the file and relaunch the server. Congratulations you have just successfully created your own Minecraft Server.

Comments(0)
There are no comments for this article.
Info Add Comment
Nickname: Email (will not be shown): Subject: Comment:
Quick Jump Menu
Subscribe to updates Subscribe to Updates
Email to a frien Email to a Friend
Print Print Article
Info Vote
Info Ask a Question
Email (will not be shown): Subject: Question: