How to setup Minecraft server on Centos 7

In the future, using the website cloudhosting.lv, you agree to the rules of using Cookies. Read more. I agree

How to setup Minecraft server on Centos 7

First to setup Minecraft server You require a server where to set it up. We suggest a svirtual server with minimum 2 core CPU, 2GB RAM and 10GB disk space. With increase of player count server resources can be increased.

This tutorial will help You set up a Minecraft server on Centos 7:

Connect to server via SSH using software called Putty

Create a Minecraft server user (for safety reasons we suggest not using root user)

sudo adduser minecraftuser

Set a password to the newly created Minecraft server user

sudo passwd minecraftuser

Add the Minecraft user to the wheel group to be able to run privileged commands

sudo usermod -aG wheel minecraftuser

Now let’s switch to the Minecraft user

su - minecraftuser

Download and install the java OpenJDK package using the following command

sudo yum install java-1.6.0-openjdk

Check the java version to make sure that the installation was successful

java -version

Install the “wget” package if it is not already installed

sudo yum install wget

Create a Minecraft directory to hold and keep the Minecraft Server files

mkdir minecraftdir

Move to the newly Minecraft directory

cd minecraftdir

Download the Minecraft Server using the next command. You can check for the latest Minecraft Server release from Minecraft official website (HERE). Then replace the below link with the newest Minecraft Server release.

wget -O minecraft_server.jar https://s3.amazonaws.com/Minecraft.Download/versions/1.11.2/minecraft_server.1.11.2.jar

Set permissions on the downloaded file to be executable

chmod +x minecraft_server.jar

Open the License agreement file “eula.txt.”

vi eula.txt

Change “eula=false” to “eula=true”

To let the Minecraft Server run in the background, you will need to download the “screen” package

sudo yum install screen

Start the “screen” package

screen

Now let’s start the Minecraft Server

java -Xmx1024M -Xms1024M -jar minecraft_server.1.11.2.jar nogui

If you are running the Minecraft Server in the background, then you can detach the current screen using the next command

screen -r 

OR

CTRL+A+D

To stop the Minecraft Server use the stop comman

stop

Your server is up and running