如何在Ubuntu 16.04上安装Starbound服务器
Ammyae
・3 分钟阅读
前提条件
- 你需要在你的Steam帐户上拥有这个游戏,
- 一个sudo用户 ,
- Ubuntu 16.04服务器实例,
安装Starbound
在开始之前,让我们确保系统是正确的,然后我们为服务器创建一个新用户,出现提示时,为该用户指定一个强健的安全密码。
sudo apt-get update
sudo apt-get upgrade
adduser starbound
passwd starbound
让我们打开必要的防火墙端口。
firewall-cmd --zone=public --add-port=21025/tcp --permanent
firewall-cmd --reload
安装运行SteamCMD所需的系统库
sudo apt-get install lib32g
切换到先前创建的用户帐户。
su starbound
cd ~
安装SteamCmd软件。
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar xf steamcmd_linux.tar.gz
接下来,我们会使用SteamCMD安装游戏服务器文件,如果Steam帐户启用Steam保护,你需要检查你的电子邮件收件箱以获得登录代码。
./steamcmd.sh
login YourAccount
*input password and steam guard code*
force_install_dir ./starbound
app_update 211820 validate
屏幕读取时 Success! App '211820' fully installed.
输入quit
并按ENTER键。
你的Starbound服务器现已安装。
自定义服务器
服务器自定义是通过编辑文件sbboot.config
完成的,只更改冒号:
之后的值。
nano ~/starbound/linux64/sbboot.config
- 在第47行将
astarbound server
,更改为所需的服务器名称,
- 在第48行将8更改为所需slot数量,
更新服务器
首先,创建文件update_starbound.txt
。
nano /home/starbound/update_starbound.txt
用以下内容填充它。
login YourAccount YourPassword
force_install_dir ./starbound
app_update 211820
quit
你可以随时使用以下命令更新你的服务器,请注意,如果启用了Steam保护,则需要在更新过程中再次输入代码。
cd ~ && ./steamcmd.sh +runscript update_starbound.txt
运行服务器
要启动你的服务器,请运行以下命令。
cd /home/starbound/starbound/linux64
screen -dmS starbound ./starbound_server
你的服务器现在正在屏幕会话中运行,你可以随时使用以下命令关闭它:
screen -S starbound -X quit