centos搭建Minecraft服务器

2019-09-04

准备

yum安装JAVA
下载服务器包 来自 https://www.mcbbs.net/thread-440617-1-1.html

Minecraft server properties

#Minecraft server properties
#Wed Sep 04 00:33:56 CST 2019
generator-settings=
op-permission-level=4
allow-nether=true
level-name=world
enable-query=false
allow-flight=false
announce-player-achievements=true
server-port=25564
level-type=DEFAULT
enable-rcon=false
force-gamemode=false
level-seed=
server-ip=
max-build-height=256
spawn-npcs=true
white-list=false
spawn-animals=true
snooper-enabled=true
hardcore=false
online-mode=false
resource-pack=
pvp=false
difficulty=3
enable-command-block=false
player-idle-timeout=0
gamemode=0
max-players=20000
spawn-monsters=true
view-distance=15
generate-structures=true
motd=holoto Server

建shell文件

mc.sh

java  -Dfml.ignoreInvalidMinecraftCertificates=true -Dfml.ignorePatchDiscrepancies=true -jar Start.jar -o false

用PM2 后台运行启动服务器

pm2 start mc.sh

image

域名

image

image