个人工具

UbuntuHelp:SteamServer

来自Ubuntu中文

跳转至: 导航, 搜索

FEEL FREE TO EXPAND THIS PAGE WITH RUNNING INFORMATION Steam is an online gaming platform used with games such as Half-Life 2, Counter-Strike: Source, Left 4 Dead, and Portal. This guide will attempt to instruct you on how to install a game SERVER - that is, you cannot play the game from the computer, but only run an online server - for these games on Ubuntu. This page has been adapted from this source.

Setting up user accounts

The server should run as its own user. Start by adding a user: sudo adduser '''l4d1''' In this case, I'm adding a user for Left 4 Dead (l4d), with an ID of '1', in case I need to add more later, I keep chronology this way. Ideas for Counter-Strike: Source names could be css1 and css2, hl2dm1 and hl2dm2 for Half-Life 2: Deathmatch, etc. It doesn't matter, as long as you remember it. Change to the user's home directory, e.g. cd /home/'''l4d1'''}}, and sudo to that user with {{{sudo -u '''l4d1''' -i (the -i is for initiate, so you don't have to type sudo in front of all your commands). Now create a directory called hlds with mkdir hlds and cd to it (cd hlds).

Getting the software

The software can be downloaded from the Steam website with the following command. wget http://storefront.steampowered.com/download/hldsupdatetool.bin This sets up the server software, allows you to download the gameservers, etc. Allow it to be executable by executing chmod +x hldsupdatetoolbin and running it (./hldsupdatetool.bin You will be asked to agree to Valve's Terms and Conditions. Simply type yes and hit enter. Next up, the game - hldsupdatetool.bin should have installed a program called steam in the directory. Type chmod +x steam to allow it to be executable. Next up, installing the game. The syntax for installing a game is: ./steam -command update -game '''GAME''' -dir . Substitute GAME by the appropriate game:

  • For Left 4 Dead: l4d_full
  • For Counter-Strike: Source: Counter-Strike Source

For the rest, I'm not sure. The next part will take a while, depending on your server's network connection. You will see a percentage appear on the left. Just sit back and wait.