ESDS Knowledge Base

02
Feb

How to install Linux Source Dedicated Server (srcds) ?

In this article we will install the source dedicated server on the Linux platform with the help of HLDS- half life dedicated server. Half Life Dedicated Server basically is a software that powers many older steam games. Generally the Counter-Strike servers are the dedicated web servers running HDLS. We assume you have enough Linux knowledge to download, run files etc.

 

First step is to start with the HLDS Update tool

 

First of all download hldsupdatetool from the site. Make a dir called srcds_l, and save hldsupdatetool in that dir and run it. (Check the following code when you have an uncompress error. – To fix your ncompress option, you have 2 options. First, you can either install ncompress by getting a mandrake rpm for ncompress OR you and link it to gunzip

Code:

ln -s /usr/bin/gunzip /usr/bin/uncompress
NOTE: Your gunzip MIGHT be in /bin/gunzip )

Command(s):

mkdir srcds_l
cd srcds_l
wget http://www.steampowered.com/download/hldsupdatetool.bin
chmod +x hldsupdatetool.bin
./hldsupdatetool.bin
./steam

The new version of HLDSUpdateTool will be downloaded now. You will be returned to the console after its done.

After the first step we need to move ahead with the downloading the files, which can be done as follows:

We can start downloading the files. This can take a few hours depending on the connection the server uses.

Command(s):

./steam -command update -game “Counter-Strike Source” -dir .

If you want to install a Half-Life 2 Deathmatch server, use “hl2mp” for the game switch.

Now its the time to start the scrds

First edit (or create) srcds_l/cstrike/cfg/server.cfg like you want it to be. Now we are ready to run the srcds.
./srcds_run -console -game cstrike +map de_dust -maxplayers 16 -autoupdate
and press enter. (-game hl2mp if it’s a HL2DM server ofcourse)
Your srcds is now up and running.

To take the extra step you can do is Running srcds in background (re-attachable)

We will make a script that will run the srcds in the background in a “screen”
you will need to have screen installed for this. make a file called server.sh and put this in:

Command(s):

#!/bin/sh
echo “Starting Cs:Source Server”
sleep 1
screen -A -m -d -S css-server ./srcds_run -console -game cstrike +map de_dust +maxplayers 16 -autoupdate

 

Save the file, and chmod it to run

Command(s):

chmod +x server.sh

If you want to start your server, simply run server.sh . It will start your srcd server in the background, to open it type:

Command(s):

screen -x css-server

If you want to close it again press ctrl+a+d, and it will detach the screen and keep it running in the background.

Leave a Reply