Minecraft (my world) Fabric 1.19.3 server building tutorial

The Debian system uses the MCSManager9 panel to build the tutorial of the MC Java version MOD server. This tutorial uses the Fabric1.19.3 server, and other servers can also be used for reference.

Video tutorial: https://www.bilibili.com/video/BV1Zd4y1h7zG/

Minecraft (MC) Fabric 1.19.3 Server Opening Tutorial, Novice Xiaobai Tutorial

Fabric introduction

Fabric is a lightweight MOD API for Minecraft1.14 and above, the main authors are asiekierka and modmuss50.
Fabric consists of two parts, including Fabric API and Fabric Loader. Fabric Loader is mainly used to realize the MOD loading function. Fabric provides some basic interfaces for developers to use, allowing other MOD to register items, models, blocks, graphical interfaces, etc., allowing MOD Modifying Minecraft bytecode through SpongePowered Mixin is safer than Forge, because Mixin can better control bytecode changes.
Fabric does not use Mod Coder Pack. It has its own deobfuscation project called "yam" (formerly pomf). yarn is open source, anyone can contribute, the open source agreement is CC0 1.0 Universal. Due to the Mod Coder Pack agreement restriction, the content contributed to Fabric cannot originate from the Mod Coder Pack.
The update speed of Fabric is very fast. Basically, when the latest version of Minecraft is released, Fabric will follow up in the shortest time, which is really very convenient!

Debian builds my world (MC) forge 1.19.3 server tutorial: https://blog.zeruns.tech/archives/697.html

Introduction to MCSM9

Distributed, stable and reliable, out of the box, highly scalable, supports control panels for Minecraft and a few other games.

The MCSManager panel (abbreviation: MCSM panel) is a fully Chinese, lightweight, out-of-the-box, multi-instance and Docker-supported Minecraft server management panel.

This software has a certain popularity in Minecraft and other game communities. It can help you centrally manage multiple physical servers , dynamically create game servers on any host, and provide a safe and reliable multi-user permission system. Easily help you manage multiple servers.

Prepare

First of all, you must have a server (the existing ones can be ignored), here are some recommendations:

Other cost-effective server recommendations: https://blog.zeruns.tech/archives/383.html

Various cloud server evaluation articles: https://www.awsl9527.cn/

If you are a new user with a discount, it is recommended to buy it for as long as you can, because the follow-up fee for the server at the discounted price is very expensive, and the discount for new users can only be purchased once, so try to buy as long as possible to save money.

Version 1.19 requires high memory usage and performance, minimum 4G memory! ! ! Don't buy ones lower than 4G. Someone bought a 2G server before and ran 1.19 and reported an error memory overflow, and then came to ask me why it couldn't be opened...

A server with 2-core 4G memory and 5 megabytes of bandwidth can have about 3 to 5 people online at the same time, and a server with 4 cores of 8G and 10 megabytes can have about 5 to 20 people online at the same time. For reference only, more mods require higher configuration.

Do not buy 1 M bandwidth! ! ! 1M bandwidth can be played by at most one or two people, it is recommended to start from 5M! ! !

In addition, the Java version of Minecraft server has higher requirements on single-core performance, especially for high-end versions and MOD servers. It is recommended to choose servers with high main frequency such as 5900X and 12900K .

After purchasing the server, choose to install the Debian10 or 11 system (you can also choose other systems, just change some commands below), and then use ssh to log in to the server. The ssh client software recommends putty or mobaxterm.

The default account is generally: the root password is set by yourself when purchasing, and some users may not set a password when purchasing, you can reset the password on the console after purchase.

connect to the server

Download, install and open the ssh client software. The ssh client software recommends putty or mobaxterm.

Enter the server IP address in the SSH client and click Open.

If the warning shown below pops up, click Yes

Then enter the account number and press Enter, the account is usually root by default , then enter the password and press Enter to confirm, it will not be displayed when entering the password.

Reminder: In the SSH terminal, press and hold the left mouse button to select the text, then release the mouse, and then click in the blank space, so that the selected text will be copied; in the SSH terminal, right-click to paste.

open port

The panel requires ports 23333 and 24444.

The default port for the Minecraft game server is 25565.

If you use Alibaba Cloud , Tencent Cloud or other cloud service providers , please enter the console to the firewall security group policy and allow the above ports .

Or allow all ports, both in and out directions.

Turn off the system's own firewall:

# 关闭防火墙,依次执行
systemctl stop firewalld
systemctl disable firewalld
service iptables stop

Install JAVA environment

Version 1.19.3 requires JDK17 . If you need to install other versions of JDK, read this article: https://blog.zeruns.tech/archives/653.html

If the download link in the command below fails, please replace and change the file name in the command. The JDK I will use below is Dragonwell17 compiled by Ali. The performance and memory usage are optimized, and the memory usage will be smaller.

Other version JDK download address: https://mirrors.tuna.tsinghua.edu.cn/Adoptium/

# 创建安装目录
mkdir /usr/local/java/

# 下载JDK17安装包,也可以自己去官网下载,如果出错就运行命令 apt install wget
wget https://img.zeruns.tech/down/Java/Alibaba_Dragonwell_Standard_17.0.5.0.5.8_x64_linux.tar.gz

# 解压当前目录下的JDK压缩文件到安装目录,将下面压缩包名字替换成你下载的
tar -zxvf Alibaba_Dragonwell_Standard_17.0.5.0.5.8_x64_linux.tar.gz -C /usr/local/java/

# 列出 /usr/local/java/ 目录内的文件夹,看看刚刚解压出来的JDK目录名称是什么,我这里是 dragonwell-17.0.5.0.5+8-GA
ls /usr/local/java/

# 软链接程序到环境变量中,记得将下面的dragonwell-17.0.5.0.5+8-GA改成你上面查到的你JDK文件夹名
ln -sf /usr/local/java/dragonwell-17.0.5.0.5+8-GA/bin/java /usr/bin/java

# 测试是否安装正常,显示 openjdk version "17.0.5" 2022-10-18 则为正常
java -version

installation panel

Quick installation with one line of command

wget -qO- https://gitee.com/mcsmanager/script/raw/master/setup.sh | bash
  • The script is only available for AMD64 architecture Ubuntu/Centos/Debian/Archlinux)
  • After the execution is complete, use systemctl start mcsm-{daemon,web}to start the panel service.
  • Use systemctl enable mcsm-{daemon,web}.serviceto enable autostart
  • The panel code and operating environment are automatically installed in /opt/mcsmanager/the directory .

Configuration file directory:data/SystemConfig/config.json

User data file directory:data/User/*.json

Remote daemon configuration file directory:data/RemoteServiceConfig/*.json

After the installation is complete, visit http://your server's ip:23333/ to enter the panel.

  • Default account: root
  • Default password: 123456

Linux manual installation

  • If one-click installation does not work, you can try this step to install manually.
# 切换到安装目录,没有此目录请执行 mkdir /opt/
cd /opt/
# 下载运行环境(已有 Node 14+ 可忽略)
wget https://npm.taobao.org/mirrors/node/v14.17.6/node-v14.17.6-linux-x64.tar.gz
# 解压文件
tar -zxvf node-v14.17.6-linux-x64.tar.gz
# 链接程序到环境变量中
ln -s /opt/node-v14.17.6-linux-x64/bin/node /usr/bin/node
ln -s /opt/node-v14.17.6-linux-x64/bin/npm /usr/bin/npm

# 准备安装目录
mkdir /opt/mcsmanager/
cd /opt/mcsmanager/

# 下载面板端(Web)程序
git clone https://github.com/MCSManager/MCSManager-Web-Production.git
# 重命名文件夹并进入
mv MCSManager-Web-Production web
cd web
# 安装依赖库
npm install --registry=https://registry.npm.taobao.org

# 返回上级目录
cd ..
# 下载守护进程(Daemon)程序
git clone https://github.com/MCSManager/MCSManager-Daemon-Production.git
# 重命名文件夹并进入
mv MCSManager-Daemon-Production daemon
cd daemon
# 安装依赖库
npm install --registry=https://registry.npm.taobao.org

# 安装nano编辑器
apt install nano

Then configure the Systemd service

Run the command nano /etc/systemd/system/mcsm-web.serviceto edit the service of the web panel, enter the following content, then press Ctrl + O and press Enter to save, and then press Ctrl + X to exit.

# /etc/systemd/system/mcsm-web.service
[Unit]
Description=MCSM 9 Web

[Service]
WorkingDirectory=/opt/mcsmanager/web
ExecStart=/usr/bin/node app.js
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

[Install]
WantedBy=multi-user.target

Run the command nano /etc/systemd/system/mcsm-daemon.serviceto edit the service of the web panel, enter the following content, then press Ctrl + O and press Enter to save, and then press Ctrl + X to exit.

# /etc/systemd/system/mcsm-daemon.service
[Unit]
Description=MCSM 9 Daemon

[Service]
WorkingDirectory=/opt/mcsmanager/daemon
ExecStart=/usr/bin/node app.js
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

[Install]
WantedBy=multi-user.target

Then start the service and set the boot to start automatically

# 重新载入变更
systemctl daemon-reload

# 设置开机自启
systemctl enable mcsm-{
    
    daemon,web}.service

# 启动服务
systemctl start mcsm-{
    
    daemon,web}.service

# 停止服务,正常情况不要运行此命令
systemctl stop mcsm-{
    
    web,daemon}.service

# 显示运行状况和日志
systemctl status mcsm-web.service
systemctl status mcsm-daemon.service -l

# 默认情况下,面板端会自动扫描 daemon 文件夹并且自动连接到守护进程。

If you don't see the daemon after logging into the panel, you can run the command below to get the key, and then manually add it to the panel as shown below.

cat /opt/mcsmanager/daemon/data/Config/global.json

127.0.0.1 in the picture below should be changed to your server public network IP or localhost

run server

First of all, we need to download a server-side core (.jar format). Here I take Fabric1.19.3 as an example.

Fabric official website: https://url.zeruns.tech/Fabric

Fabric-1.19.3 Baidu network disk download address: https://url.zeruns.tech/MZ0c2

Click Application Instance→New Instance→Java Edition Minecraft Server→Upload a single server software



Enter a name you want to set, start the command input java -Xmx4G -server -Dfile.encoding=UTF-8 -Duser.language=zh -Duser.country=CN -jar ${ProgramName}, and then click the upload server software below to select the jar file downloaded above.

Analyze the startup command above: -Xmx4Git means that the maximum memory is limited to 4G , you can change it to 8G or other values, it is recommended to set it a little smaller than the actual memory of your server; it means to -jarrun the jar program, fill in the name of the jar file to be run later , and the latter ${ProgramName}Represents the file name you will upload next; -Dfile.encoding=UTF-8specify the file encoding as UTF-8 , which can avoid the problem of Chinese garbled characters; -Duser.language=zh -Duser.country=CNspecify the language and region as Chinese and China , and some plug-ins or servers will automatically switch to Chinese.

After the upload is complete, click Go to edit the specific parameters of the instance, and click Console.

Then click to open the instance and wait for the installation to complete. The domestic server may fail to download due to the special domestic network environment.

If the download and installation fails, download the compressed package linked below. I have already run and installed this compressed package. Upload the compressed package to the server and decompress it. Change the startup command to , and then start the instance bash run.sh.

Fabric-1.19.3 Download the compressed package of the library file: https://url.zeruns.tech/LLMMy Extraction code: kyrk

If the download and installation is successful, the terminal will display the information as shown in the figure below, and then you need to modify the eula.txt file and agree to the eula agreement.

Click on a specific configuration .

Then click Browse under [General] eula.txt , change the No of eula to Yes , then click to save the configuration, then click to return to the configuration file list and return to the console.

Click again to start the instance . If Done appears, it means the server is started successfully.

Then click Specific Configuration→[General] server.properties , and then you can modify the server settings. For non-genuine users, remember to set Online Genuine Verification to No, and click Save after the settings are completed. After modification, restart the instance.


QQ group 2: 746189110

MC open server communication QQ channel: https://url.zeruns.tech/mc_qq

Minecraft service exchange community: https://bbs.csdn.net/forums/Minecraft

enter the game

Click Add Server in the game and enter your server’s public IP. If you change the port, you need to add the port number. The colon between the IP and the port should use an English colon instead of a Chinese colon.

recommended reading

Guess you like

Origin blog.csdn.net/u012513463/article/details/128436917