Ubuntu22.04部署幻兽帕鲁服务器

发布于 2024-01-26  2 次阅读


1.安装steamcmd

1.1以 root 用户身份创建 Steam 用户

sudo useradd -m steam

输入以下命令设置steam用户密码,需输入两次

sudo passwd steam

1.2进入其主文件夹

sudo -u steam -s
cd /home/steam

1.3安装依赖

sudo apt update
sudo apt-get install lib32gcc-s1

如果报错:
root@:~# sudo apt-get install lib32gcc-s1 Reading package lists... Done Building dependency tree... Done Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: libc6-i386 : Depends: libc6 (= 2.31-0ubuntu9.14) but 2.35-0ubuntu3.6 is to be installed E: Unable to correct problems, you have held broken packages.

则尝试更换apt源

1.4为 SteamCMD 创建一个目录并切换到它

mkdir ~/Steam && cd ~/Steam

1.5下载并解压 Linux 版 SteamCMD

curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -

1.6运行 SteamCMD

cd ~/Steam
./steamcmd.sh

2安装PalServer

2.1 匿名登录

login anonymous

显示OK后说明登陆成功,不成功多试几次

2.2安装/更新帕鲁服务器

app_update 2394010 validate

2.3解决steamclient.so报错

报错信息如下:
.steam/sdk64/steamclient.so: cannot open shared object file: No such file or directory

解决方法:

app_update 1007

quit

mkdir -p ~/.steam/sdk64/

cp ~/Steam/steamapps/common/Steamworks\ SDK\ Redist/linux64/steamclient.so ~/.steam/sdk64/

3.运行服务器

cd ~/Steam/steamapps/common/PalServer

./PalServer.sh

但是这样退出终端后会关闭服务器?如何持久化运行请参考下面的文章

https://blog.zjhsun.tk/2024/01/28/%e6%90%ad%e5%bb%ba%e5%b9%bb%e5%85%bd%e5%b8%95%e9%b2%81%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%90%8e%e5%a6%82%e4%bd%95%e5%bc%80%e6%9c%ba%e8%87%aa%e5%8a%a8%e5%90%af%e5%8a%a8%e6%9c%8d%e5%8a%a1/