centos 7上搭建原版 Minecraft 服务器,直接进入正题:
①安装jdk-1.8.0
yum install -y java-1.8.0*②创建mc目录
mkdir /tmp/minecraft③下载好mc服务器的压缩包(minecraft_server.1.7.10.jar)和库文件(libraries),移动到/tmp/minecraft目录下
④运行下面命令启动服务器
java -Xmx2048M -Xms1024M -jar minecraft_server.jar nogui //-Xms为最低使用内存,-Xmx为最高使用内存,nogui为以命令行开启⑤第一次运行提示加载 eula.txt 失败
[16:36:36] [Server thread/INFO]: Loading properties
[16:36:36] [Server thread/WARN]: server.properties does not exist
[16:36:36] [Server thread/INFO]: Generating new properties file
[16:36:36] [Server thread/WARN]: Failed to load eula.txt
[16:36:36] [Server thread/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.eula.txt
eula=false
修改为eula=trueserver.properties
online-mode=true
修改为online-mode=false //其他选项依个人喜好修改⑦关闭SELinux、firewalld(懒得设置,直接关闭了)
vi /etc/selinux/config
SELINUX=enforcing
修改为
SELINUX=disabledsystemctl disable firewalld
systemctl stop firewalld⑧再次运行命令启动服务器,即可成功开启(可编写运行脚本就不用每次打一长串开启命令啦),赶快约起小伙伴们一起玩耍吧
java -Xmx2048M -Xms1024M -jar minecraft_server.jar nogui
版权声明:本文为xm1129968693原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。