Installing a Minecraft Server on CentOS 7

Install Minecraft Server CentOS 7

In this tutorial, we will be guiding you through the set up of a Minecraft Server on our high-performance VPS servers. This setup guide will also work on dedicated servers using CentOS 7.

Requirements

Installation

Creating a Minecraft server is very straightforward. First login to your new CentOS 7 1GB RAM VPS Server and install Java 1.8.0 Open JDK via Putty SSH or Terminal (Mac).

ssh root@server.ip.address
yum install yum install java-1.8.0-openjdk -y
yum install screen -y

Create a user to run your Minecraft Server under. This is optionial but for the best level of security it is not good practice to run a Minecraft server as the root user. Run the following commands and once you have entered 'passwd mcuser' you will be asked to enter your new secure password.

adduser mcuser
passwd mcuser
chown mcserver `tty`

Now lets change to our new user mcuser and install Minecraft. Change the wget URL accordingly for newer versions of Minecraft.

su - mcuser
mkdir minecraft
cd minecraft
wget -O minecraft_server.jar https://s3.amazonaws.com/Minecraft.Download/versions/1.12.2/minecraft_server.1.12.2.jar
chmod +x minecraft_server.jar
screen
echo "eula=true" > eula.txt
#start your Minecraft Server
java -Xmx768M -Xms768M -jar minecraft_server.jar nogui

You will start to see an output from the terminal as shown below

[mcuser@mc minecraft]$ java -Xmx768M -Xms768M -jar minecraft_server.jar nogui
[15:49:55] [Server thread/INFO]: Starting minecraft server version 1.12.2
[15:49:55] [Server thread/INFO]: Loading properties
[15:49:55] [Server thread/WARN]: server.properties does not exist
[15:49:55] [Server thread/INFO]: Generating new properties file
[15:49:55] [Server thread/INFO]: Default game type: SURVIVAL
[15:49:55] [Server thread/INFO]: Generating keypair
[15:49:56] [Server thread/INFO]: Starting Minecraft server on *:25565
[15:49:56] [Server thread/INFO]: Using epoll channel type
[15:49:57] [Server thread/INFO]: Preparing level "world"
[15:49:58] [Server thread/INFO]: Loaded 488 advancements
[15:49:59] [Server thread/INFO]: Preparing start region for level 0
[15:50:00] [Server thread/INFO]: Preparing spawn area: 4%
[15:50:01] [Server thread/INFO]: Preparing spawn area: 6%
[15:50:02] [Server thread/INFO]: Preparing spawn area: 9%
[15:50:03] [Server thread/INFO]: Preparing spawn area: 11%

Once the spawn area status shows as 'Done' your server is ready to connect to from your MineCraft game.

Increasing Memory Usage

You can adjust the memory used by changing the last command we entered above. For instance to set the memory usage to 2GB (2048MB) of RAM you would run:

java -Xmx2048M -Xms2048M -jar minecraft_server.jar nogui
  • MineCraft
  • 1 Users Found This Useful
Was this answer helpful?