Steam搭建私服教程

0、設(shè)置服務(wù)器交換空間

dd if=/dev/zero of=/mnt/swap bs=1M count=4096

mkswap /mnt/swap

swapon /mnt/swap

vi /etc/fstab

/mnt/swap swap swap defaults 0 0

reboot

1、安裝編譯環(huán)境

yum update -y
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -y
yum install glibc.i686 libstdc++.i686 libcurl.i686 screen -y

2、下載 steamCMD,安裝

useradd -m steam
su steam
mkdir ~/steamcmd
cd ~/steamcmd
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xvzf steamcmd_linux.tar.gz

./steamcmd.sh

quit

3、在steam 狀態(tài)下匿名登錄,安裝??服務(wù)器

./steamcmd.sh +login anonymous +force_install_dir ~/SatisfactoryDedicatedServer +app_update 1690800 validate +quit

yum -y install SDL2.i686 SDL2.x86_64

4、加載存檔

mkdir -p ~/.config/Epic/FactoryGame/Saved/SaveGames/server
cd ~/.config/Epic/FactoryGame/Saved/SaveGames/server
#上傳.sav存檔?件?此處

5、服務(wù)器編譯配置(以下內(nèi)容需root權(quán)限)

vim /home/steam/SatisfactoryDedicatedServer/start_server.sh
#!/bin/bash
export InstallationDir=/home/steam/SatisfactoryDedicatedServer
export templdpath=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$InstallationDir/linux64:$LD_LIBRARY_PATH
# Install or update the server before launching it
/usr/games/steamcmd +login anonymous +force_install_dir $InstallationDir +app_update 1690800 validate +quit
# Launch the server
$InstallationDir/FactoryServer.sh
export LD_LIBRARY_PATH=$templdpath
chmod +x /home/steam/SatisfactoryDedicatedServer/start_server.sh

vim /etc/systemd/system/satisfactory.service
[Unit]
Description=Satisfactory Server
Wants=network.target
After=syslog.target network-online.target
[Service]
Type=simple
Restart=always
RestartSec=10
User=steam
WorkingDirectory=/home/steam/SatisfactoryDedicatedServer
ExecStart=/home/steam/SatisfactoryDedicatedServer/start_server.sh
[Install]
WantedBy=multi-user.target
systemctl enable satisfactory.service
systemctl start satisfactory.service
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容