Centos7通过arclight核心开我的世界1.17服务器
准备
系统:Centos7系统
开服核心:arclight-forge-1.17.1-1.0.2.jar
运行环境:jdk-17_linux-x64_bin.tar.gz
安装jdk17环境
#解压jdk17软件包
[root@VM-16-16-centos mc]# tar -xzf jdk-17_linux-x64_bin.tar.gz
#进入解压后文件夹,查看当前路径
[root@VM-16-16-centos mc]# cd jdk-17.0.2/
[root@VM-16-16-centos jdk-17.0.2]# pwd
/root/mc/jdk-17.0.2
#添加环境变量
[root@VM-16-16-centos mc]# vim /etc/profile
####在最后一行追加环境变量####
export PATH=$PATH:/root/mc/jdk-17.0.2/bin
############################
#重新加载环境变量
[root@VM-16-16-centos jdk-17.0.2]# source /etc/profile
#查看jdk17是否安装成功
[root@VM-16-16-centos jdk-17.0.2]# java -version
java version "17.0.2" 2022-01-18 LTS
Java(TM) SE Runtime Environment (build 17.0.2+8-LTS-86)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.2+8-LTS-86, mixed mode, sharing)
运行开服核心
[root@VM-16-16-centos mc]# cd /root/mc/
[root@VM-16-16-centos mc]# java -jar arclight-forge-1.17.1-1.0.2.jar
等待开服核心所需文件下载完成
The server installed successfully
You can delete this installer file now if you wish
执行启动脚本,同意声明并且再次启动
[root@VM-16-16-centos mc]# ./run.sh
#弹出未同意许可提示
[16:01:30] [main/WARN]: Failed to load eula.txt
[16:01:30] [main/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.
#修改eula.txt文件,改为同意
[root@VM-16-16-centos mc]# vi eula.txt
#####修改前#####
eula=false
################
#将false改为true
#####修改后#####
eula=true
################
#再次启动运行脚本
[root@VM-16-16-centos mc]# ./run.sh
等待地图加载完成,开服成功
[16:06:03] [Worker-Main-5/INFO]: Preparing spawn area: 90%
[16:06:04] [Server thread/INFO]: Time elapsed: 59443 ms
[16:06:04] [Server thread/INFO]: Done (69.396s)! For help, type "help"
保持服务器在后台运行
#输入stop关闭服务器返回bash
stop
[16:12:19] [Server thread/INFO]: Stopping the server
[16:12:19] [Server thread/INFO]: Stopping server
#yum安装screen软件
[root@VM-16-16-centos mc]# yum install -y screen
#创建一个mc的窗口
[root@VM-16-16-centos mc]# screen -S mc
#启动服务器
[root@VM-16-16-centos mc]# ./run.sh
#直接断开终端即可,服务器会在后台运行
#重新进入服务器终端
#查看正在运行的面板
[root@VM-16-16-centos ~]# screen -ls
There is a screen on:
10106.mc (Detached)
1 Socket in /var/run/screen/S-root.
#进入运行的面板
[root@VM-16-16-centos mc]# screen -r mc
常见问题
- 检查端口是否被占用
- 防火墙端口是否开放
- 服务器安全策略是否开放
评论 (0)