DOD – Steam Linux Dedicated Server –
Install How-To
I got most of this information for this great post on the steam forums: http://forums.steampowered.com/forums/showthread.php?threadid=292495
First you need to add a user to run the server from:
#useradd -m
"game"
#passwd game
New Unix Password:
yourpass
Now login to the user you
made and make the directory to install the server to.
$mkdir /home/game/hlds_1
Move that file to the
install directory if it is not their:
$mv hldsupdatetool.bin
/home/game/hlds_1/
Make the installer
executable:
$cd /home/game/hlds_1
$chmod +x
hldsupdatetool.bin
Run the installer:
$./hldsupdatetool.bin
(answer yes)
If you get and error like
"sh: line 1: uncompress: command not found"
Try this command and then
rerun it:
#ln -s /usr/bin/gzip
/usr/bin/uncompress
Now install steam and the
game of your choice:
To see games and commands
type this:
$./steam -command update
This is the command to
install dod to this directory.
$./steam -command update
-game dod -dir /home/game/hlds_1
To update a game once
installed your command will look like this:
$./steam -command update
-game dod
To launch the server use
this command:
$./steam –command update
–game dod –port 27015 +ipxxx.xxx.xxx.xxx +map dod_donner +maxplayers 20
Once you get everything
working the way you want you can make a script to start the server the way you
want. To do that we will make a script in the ~hlds_1 directory:
$nano
/home/game/hlds_1/start-dod
Input this into the start-dod file, which you are making with nano:
#!/bin/sh
cd $HOME/hlds_1
export LD_LIBRARY_PATH=$HOME/hlds_1:$LD_LIBRARY_PATH
/usr/bin/screen -A -m -d -S dod ./hlds_run -game dod -port 27015 +map dod_donner +maxplayers 12
The reason the +ip command was taken out was because my server is behind a linksys router and when you input the ip address of the wan connection you cannot connect to the server from inside the lan.
Make “start-dod”
executable:
$chmod +x start-dod
To launch the server now
all you need to type is this while in the hlds_1 directory:
$./start-dod
Now check to see if it
started:
$ps –x
It should be listed in the processes as hlds_run…… or hlds_amd…… etc.
To view the server
output to console type the following
$screen -x dod
If you want to close it
again press ctrl+a+d, and it will detach the screen and keep it running in the
background.
To setup the server
behind a router:
Like mentioned before
launch the server without the +ipxxx parameter. Then on the router you
will have to port forward port 27015 to the lan ip of the server machine.
This will allow you to connect to the server from inside the lan and allow
people for outside the lan to connect.