Building Minecraft server with the help of Linux

in #minecraft7 years ago (edited)

Building Minecraft server with the help of Linux


Written by ChangeZ008
Translated by Jianwen


Preface


his tutorial is compiled by ChangeZ008,and the related technology and the steps are summarized jointly by SouthRose and ChangeZ008.A special thank to SouthRose for his help.

Zeroth, You need to have a server.


To set up the MC server, the first thing you need to have is your own server. Then learn some basic knowledge of server. I use DigitalOcean server.Now I will take Linux (Ubuntu 16.04.3 x64) operating system for example.

【 Notice 】 The server operating system used to build the MC server must be 64 bit.

First, install the Java environment on your server.


MC is established on the Java platform , and can only run properly under the Java environment. You can not discuss MC without Java .
Installating Java environment under the Ubuntu system requires the following steps:
1.Use the following commands to install the JRE.
sudo apt-get install default-jre

You will be asked whether to to continue or not during the installation process, and choose "Yes" (Yes).

【 Notice 】When asked whether or not to continue in the installation process ,all choose "Yes".

2.Use the following commands to install the JDK.
sudo apt-get install default-jdk
3.Use the following four commands in turns to install Java.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default

4.After the installation is completed, you can use the following commands to view the version of Java you installed.
java -version

【 Notice 】 If readers need to install Java6 or Java 7, you simply need to replace "Java8" in the above command.
After installing Java on the server, we need to download MC official server, I will take 1.7.10 version server for example.

Second, download the MC official server to the server.


After installing Java on the server, we need to download MC official server, I will take 1.7.10 version server for example.
【Notice 】 This step not requires readers to download server file to the local devices, but to the server!
【Warm prompt 】The official server does not support the mod, if you want to carry on mod on the server, please use the third party server, such as CraftBukkit.
Download address is as follows:
https://s3.amazonaws.com/Minecraft.Download/versions/1.7.10/minecraft_server.1.7.10.jar
You need to input the command:
wget https://s3.amazonaws.com/Minecraft.Download/versions/1.7.10/minecraft_server.1.7.10.jar

The download is complete.

I suggest to store the server files in an appropriate folder after the download, for example, I put it under /root/MCS1710 / directory.

【 Notice 】I use FlashFXP software to manage the server files, you can also use commands to manage and operate the files.

Third, teach♂ the service side.


At this point, do you think that all things are over? If you think so, you are wrong, the server will not run automatically while you leave it alone. The next thing to do is to teach the service side (configured correctly).
You need such operations:

  1. Open the server (first time)
    You need to enter the following commands.
    cd MCS1710
    java -jar minecraft_server.1.7.10.jar
    As is shown above, you will find that the server does not open normally, but something new appear under the server folder. ![]() ![]()

    At this time, don't be sad, don't be impatient, because life did not deceive you. You must have noticed a message: you need to agree to the end user license agreement (EULA) to start the server.
    2.Agree to EULA
    Open the eula.txt.,change the last "false" to "true".

    3.Open the server (second time)
    The instructions are same as the first time. You will find that this time the run is successful, and something new appear under the folder also.

    Now, however, the service side just gave you a default world (difficulty of peace, all players have no jurisdiction, pirated players can't get into the world, etc.).If you think it is ok, please jump straight to the fourth part "open MC client and connect to the server"; Otherwise, your configuring is not over yet.

    4.Shut down the server.
    After successfully open the server, you will enter the server console. This time you need to quit the server, use the following instructions:

    stop

    The end of the interface is shown:

    1. Modify the configuration file.
      Since you reach here, you are supposed not satisfied with the default of the world, so we need to adjust some configurations. Most files within the folder are related to the configuration.However, the most important one is the server.properties server.
      Limited to space, of course, and considering the readers' patience, I will only mention a few configurations of importance, and use simple language to explain. More about the configuration file or professional information, see:
      https://minecraft-zh.gamepedia.com/Server.properties
      Open the file, you will see a list of configurations. Not understand? Don't worry, see the configurations one by one. Where I underline might be the place you interested in.
    1. online - mode: only the original MC players are allowed by default (true), if you need to let the pirated players also connect to the server, please change it to false.
    2. difficulty: The difficulty from 0 ~ 3 is in turn: peace, simple, common and difficult, simple is the difficulty by default.
    3. gamemode: The gamemode from 0 ~ 3 is in turn:survival, creating, adventure, on the sidelines. Survival mode is by default, if you want to use the server to buile, please change to 1.

    6.Open the server (officially open).
    The instructions are as same as the first time.

    Fourth, open the MC client and connect to the server.


    Open the MC client, select the "multiplayer", "add server", in "server address" column input:
    <服务器IP>:25565

    The connection is successful, you enter the server, as shown, I set up a world of peace difficulty, creating mode.

    Then there is the last step: set the administrator. You need to enter this command on the server:

    op < player name >

    For example, I input op ChangeZ008 to set myself as the administrator (op), and input /gamemode 0 command to switch the game mode to survive,as is shown below.

    Finally, congratulations, you are free to play now.

    Conclusion


    If you have any question, please contact ChangeZ008 / South - Rose.
    Please excuse me for the poor quality of the article typesetting.