centos下minecraft内网开服

    xiaoxiao2021-03-25  137

    关键字: centos,minecraft 1.8.9, Screen, iptables

    下载minecraft_server.1.8.9.jar服务器文件到centos解压服务器文件

    进入终端,进入minecraft的目录,

    java -Xms1g -Xmx1g -jar minecraft_server.1.8.9.jar

    第一次启动后,需要同意EULA文件。

    vim eula.txt

    将eula=false改为eula=true

    再次运行期间它自己会生成许多文件,这些文件非常重要不可以删除。说明开服成功!然在Done (14.786s)! For help, type "help" or "?" 下面输入stop来关闭服务器。

    配置server.properties文件中下面的变量, 记得保存

    vim server.properties

    server-ip=192.168.3.109 online-mode=false

    正式启动服务器。

    screen ./minecraft_server

    ctl-a d 这一步为screen命令,ctl-a为control与a同时按下,然后按d (使用 screen, 意在ssh链接断开后服务器仍然保持运行)

    打开centos防火墙端口, 否者客户端连不上 sbin/iptables -I INPUT -p tcp --dport 25565 -j ACCEPT 写入修改 /etc/init.d/iptables save 保存修改 service iptables restart 重启防火墙,修改生效

    参考: http://www.jianshu.com/p/2bbcead70390 https://tieba.baidu.com/p/3811696768 http://jingyan.baidu.com/article/1709ad8096a4934634c4f0fd.html https://tieba.baidu.com/p/4603092442 http://jingyan.baidu.com/article/1709ad8096a4934634c4f0fd.html http://blog.chinaunix.net/uid-26729093-id-4287001.html

    转载请注明原文地址: https://ju.6miu.com/read-37845.html

    最新回复(0)