Loading... #### 1. 安装steamCMD和游戏文件 ``` //进入根目录以及安装对应的环境包 cd / yum install glibc.i686 yum install libstdc++.i686 //安装steamCMD mkdir /opt/steamcmd cd /opt/steamcmd wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz tar -xvzf steamcmd_linux.tar.gz ./steamcmd.sh ``` ``` Steam>login anonymous app_update 380870 validate Connecting anonymously to Steam Public...OK Waiting for client config...OK Waiting for user info...OK Steam>app_update 380870 validate Update state (0x3) reconfiguring, progress: 0.00 (0 / 0) Update state (0x3) reconfiguring, progress: 0.00 (0 / 0) Update state (0x3) reconfiguring, progress: 0.00 (0 / 0) Update state (0x11) preallocating, progress: 79.67 (1816652179 / 2280220537) Update state (0x61) downloading, progress: 99.85 (2276813566 / 2280220537) Success! App '380870' fully installed. Steam> Update state (0x3) reconfiguring, progress: 0.00 (0 / 0) Update state (0x5) verifying install, progress: 15.95 (363775820 / 2280220537) Update state (0x5) verifying install, progress: 44.83 (1022232764 / 2280220537) Update state (0x5) verifying install, progress: 74.09 (1689468567 / 2280220537) Success! App '380870' fully installed. ``` #### 2. 运行游戏服务端 ``` cd /home/ubuntu/.steam/steam/steamapps/common/'Project Zomboid Dedicated Server' ./start-server.sh ``` 出现下列提示代表开服成功 ``` *** Steam is enabled server is listening on port 16261 1639909666320 LuaNet: Initializing... 1639909666320 LuaNet: Registering server listener... 1639909666320 LuaNet: Initialization [DONE], triggering events for 'LuaNet.onInitAdd'. DISCORD: token not configured *** DISCORD DISABLED **** 1639909666321 ########## Server Steam ID 90154238313591812 ########## 1639909666369 Missing texture: media/textures/weather/fogwhite.png 1639909666432 znet: OnPolicyResponse 1639909666432 znet: Zomboid Server is VAC Secure ``` #### 3. 后台运行服务器 ###### 3.1 安装多重视窗管理程序 ``` # 安装screen多重视窗管理程序 sudo yum install screen 键入'y'安装 ``` ###### 3.2 在多任务视窗程序中启动服务器 ``` screen -s pz # 完成后会跳到一个新界面 cd /home/ubuntu/.steam/steam/steamapps/common/'Project Zomboid Dedicated Server' ./start-server.sh # 出现成功开服的提示之后 按 'Ctrl+A+D' 返回到主视图 如果是下图则代表成功 ```  ###### 3.3 如何返回多任务视图重启服务器? ``` # 控制台输入 screen -r pz screen -r pz # 然后 'CTRL+C' 退出任务 执行 start-server.sh 启动服务器 ./start-server.sh ```  <div class="tip inlineBlock warning"> 返回控制台一定要输入 `screen -r pz` 而不是 `screen -s pz` -s是新建任务视图 -r才是载入已有的任务视图 </div> Last modification:January 18, 2022 © Allow specification reprint Support Appreciate the author AliPayWeChat Like 0 感谢大佬投喂 啾咪~