注:这服务器配置很低,且延迟高(四川200-300),拿来玩玩就行。
- 注册serv00账号(略)
- SSH登录serv00
从你注册时的邮箱当中获取登录信息
打开任何一个ssh连接工具
主机为邮件中的SSH/SFTP server address 后面那段
验证方法(如果有)一定要选择keyboard interactive
- 创建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
- 启动服务器,并打开端口
[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面板。
找到
点击
添加端口,不一定为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:端口号