如何在serv00上搭建我的世界服务器

注:这服务器配置很低,且延迟高(四川200-300),拿来玩玩就行。

  1. 注册serv00账号(略)
AD

临时邮箱:https://temp-mail-web.xxecy.eu.org

  1. SSH登录serv00

从你注册时的邮箱当中获取登录信息

打开任何一个ssh连接工具

主机为邮件中的SSH/SFTP server address 后面那段

验证方法(如果有)一定要选择keyboard interactive

  1. 创建Screen,并下载我的世界服务端
[xxecy@s1]:<~>$ screen -S mc
[xxecy@s1]:<~>$ cd domains/
[xxecy@s1]:<~/domains>$ wget https://api.papermc.io/v2/projects/paper/versions/1.8.8/builds/445/downloads/paper-1.8.8-445.jar
  1. 启动服务器,并打开端口
[xxecy@s1]:<~/domains>$ java -Xmx1512M -Xms1512M -jar paper-1.8.8-445.jar nogui

会看到

[xxecy@s1]:<~/domains>$ java -Xmx1512M -Xms1512M -jar paper-1.8.8-445.jar nogui
Downloading vanilla jar...
Patching vanilla jar...
Loading libraries, please wait...
[05:18:40 INFO]: Starting minecraft server version 1.8.8
[05:18:40 INFO]: Loading properties
[05:18:40 WARN]: server.properties does not exist
[05:18:40 INFO]: Generating new properties file
[05:18:40 WARN]: Failed to load eula.txt
[05:18:40 INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.
[05:18:40 INFO]: Stopping server
[xxecy@s1]:<~/domains>$

我们去同意eula条款

[xxecy@s1]:<~/domains>$ nano eula.txt 

将 eula=false 改为 eula=true

修改完后重新启动

会看到

[xxecy@s1]:<~/domains>$ java -Xmx1512M -Xms1512M -jar paper-1.8.8-445.jar nogui
Loading libraries, please wait...
[05:24:59 INFO]: Starting minecraft server version 1.8.8
[05:24:59 INFO]: Loading properties
[05:24:59 INFO]: Default game type: SURVIVAL
[05:24:59 INFO]: This server is running CraftBukkit version git-PaperSpigot-445 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)
[05:24:59 INFO]: Unable to find file banned-players.json, creating it.
[05:24:59 INFO]: Unable to find file banned-ips.json, creating it.
[05:24:59 INFO]: Unable to find file ops.json, creating it.
[05:24:59 INFO]: Unable to find file whitelist.json, creating it.
[05:24:59 INFO]: Debug logging is disabled
[05:24:59 INFO]: Spigot Timings: true - Verbose: true - Interval: 5m - Length: 60m
[05:24:59 INFO]: Server Ping Player Sample Count: 12
[05:24:59 INFO]: Using 4 threads for Netty based IO
>WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.github.paperspigot.PaperSpigotConfig (file:/usr/home/uesr123/domains/cache/patched_1.8.8.jar) to field java.lang.reflect.Field.modifiers
WARNING: Please consider reporting this to the maintainers of org.github.paperspigot.PaperSpigotConfig
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[05:24:59 INFO]: Data value allowed items: 
[05:24:59 INFO]: Generating keypair
[05:25:02 INFO]: Starting Minecraft server on *:25565
[05:25:02 INFO]: Using default channel type
[05:25:03 INFO]: Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system unstability.
[05:25:03 WARN]: **** FAILED TO BIND TO PORT!
[05:25:03 WARN]: The exception was: java.net.SocketException: Operation not permitted
[05:25:03 WARN]: Perhaps a server is already running on that port?
[05:25:03 INFO]: Stopping server
[05:25:03 INFO]: Saving players
>[xxecy@s1]:<~/domains>$ 

接下来我们去打开端口。登录你的serv00面板。

找到image

点击image

添加端口,不一定为25565端口,我们后边修改

添加完后回到ssh

[xxecy@s1]:<~/domains>$ nano server.properties 

将server-port=25565 中的 25565 修改为你创建的端口
如果你没有正版,记得将 online-mode=true 改为 false

#Minecraft server properties
#Sat Jul 20 05:24:59 CEST 2024
player-idle-timeout=0
motd=A Minecraft Server
force-gamemode=false
view-distance=10
white-list=false
server-ip=
pvp=true
spawn-npcs=true
spawn-animals=true
generate-structures=true
gamemode=0
server-port=11451
difficulty=1
max-players=20
resource-pack=
online-mode=true
allow-flight=false
resource-pack-hash=

保存,重新启动服务器,此时将畅通无阻。

优化

在控制台输入stop

[xxecy@s1]:<~/domains>$ cd plugins/
[xxecy@s1]:<~/domains/plugins>$ wget https://mediafilez.forgecdn.net/files/2744/510/LaggRemover-2.0.6.jar
[xxecy@s1]:<~/domains/plugins>$ ../
[xxecy@s1]:<~/domains>$

重新启动服务器即可

服务器地址为: 你的用户名.serv00.com:端口号

9 个赞

好的,学会了()

1 个赞

已阅,有没有容器化的部署?

1 个赞

好嘞,有时间试试

1 个赞

注册都过不了。。。。

1 个赞

节点问题

感谢分享 尝试了下 宿主机的java不支持1.21新版本 1.20 1.19 1.18因java版本问题也启动不了

以下是宿主机Java信息

java -version
openjdk version "11.0.23" 2024-04-16
OpenJDK Runtime Environment (build 11.0.23+9-1)
OpenJDK 64-Bit Server VM (build 11.0.23+9-1, mixed mode)

支持搭建的最新paperMC版本为1.16.5

https://api.papermc.io/v2/projects/paper/versions/1.16.5/builds/794/downloads/paper-1.16.5-794.jar

paperMC历史版本下载

Build explorer | PaperMC

1 个赞

感谢分享

1 个赞

我还没细看过java版本。但就这个机器的性能,用1.16.5怕是要卡飞天

这,不会卡死吗?

加了优化插件后还行

想要白嫖一个ser00但是注册的时候一直提示我在维护,不知道什么问题

换个IP试试

是IP的问题嘛?行,那我多试试几个节点

找到了,终于找到了