steam森林the forest服务器搭建【linux】

1.需要提前准备

  • steamcmd
sudo apt-get install steamcmd:i386

steamcmd +@sSteamCmdForcePlatformType windows +login anonymous +force_install_dir /games/forest +app_update 556450 validate +quit
  • wine(由于森林只提供windows服务端,需要wind在linux上运行)
sudo apt-get install wine-stable
  • winbind(同上)
sudo apt-get install winbind
  • xvfb
sudo apt-get install xvfb
  • screen
sudo apt-get install screen

2.搭建

  • 新建一个脚本run.sh
  • 给脚本运行权限chmod 777 run.sh
  • 在脚本中写入命令
screen -t 'forest' -S 'forest' -dm bash -c 'cd /games/forest; xvfb-run --auto-servernum --server-args="-screen 0 640x480x24:32" wine ./TheForestDedicatedServer.exe -batchmode -nographics -savefolderpath "/games/data/forest/saves/" -configfilepath "/games/data/forest/config/config.cfg"; exec sh'
  • 运行脚本./run.sh
  • 通过screen -r forest查看后台

3. 注意

  • 上述流程均转载自https://steamcommunity.com/sharedfiles/filedetails/?id=1423538141,如有问题请自行查阅
  • 服务器配置参照https://www.594594.xyz/2020/03/19/ECS_build_The%20Forest_server/

4. 说下我自己遇到的问题

  • 服务器需要开放8766, 27015, 27016三个端口
  • 服务器配置中ServerIP需要是内网ip,不是外网ip
  • 后台没有报错还是无法正常开启,检查安装wine的版本(wine --version),如果是3.0版本,想办法安装4.0以上的版本(http://iqotom.com/?p=244
  • 后台一直报错RenderTexture.Create failed: format unsupported - 2., 在wine的参数后面加|grep -v "RenderTexture.Create failed: format unsupported - 2.",如下:(但还是会一直输出空行,感觉没什么意义)
screen -t 'forest' -S 'forest' -dm bash -c 'cd /home/forest; xvfb-run --auto-servernum --server-args="-screen 0 640x480x24:32" wine ./TheForestDedicatedServer.exe -batchmode -nographics -savefolderpath "/home/forest/saves/" -configfilepath "/home/forest/config/config.cfg" |grep -v "RenderTexture.Create failed: format unsupported - 2."; exec sh'
  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值