Installing Counter Strike source server in Linux
Ok, So I decided to do a counter strike source server install on a Linux server last night. The documentation on this sucks! So, I am writing a how to for all of those people who want a counter strike source server and just do not know how or are to impatient like me to read all of this crap!
Getting the Linux server ready
Note:It is not advisable to run any program as root if avoidable, so lets make a user to run this.
Step1. Login to your server through console or ssh as root.
Step2. run the command adduser and the desired login name, in this case we will use css so the command will be adduser css
Step3. Now, we need to password protect this login so run passwd css and then enter the desired password.
Step4. Login as the new user css or whatever name you should choose, make sure you pic a strong alphanumeric password such as 0mGz!8MyD0gg!3 for example.
Installing Steam and CSS
Note: This takes a while so once the install starts sit back and grab a beer.
Step1. In the home directory for the css user, make a directory called csrds by issuing the following command mkdir csrds
Step2. cd crds
Step3. wget http://linuxhelpresource.com/downloads/hldsupdatetool.bin
Step4. chmod +x hldsupdatetool.bin
Step5. run the command ./hldsupdatetool.bin
Step6. If you agree with all the licensing crap hit yes
Note: If you get the following error ‘uncompress: command not found’ run the following command as root : ln -s /bin/gunzip /bin/uncompress
Step7. run the following command to update Steam ./steam -command update -game “Counter-Strike Source” -dir .
Step8. once step 7 completes, run the command again ./steam -command update -game “Counter-Strike Source” -dir .
Note: This is gunna take a while longer, go pay attention to your wife and kids………….
Post Installation ” Getting it all up and running”
Ok, now you have done all of this, Guess what? It is installed now.. Lets bring it online.
Step1. Figure our what variables you want to add to the command, Below are possible options:
-autoupdate will update the game server to the latest version before launching it.
+maxplayers the maximum amount of players you want on your server
+map what map you want to play on, FYE de_dust
-port if you would like to run the game on a custom port
-ip if you would like to run the game on a specific ip ( handy for server resellers)
Now, lets launch a basic configuration of this server with the following command:
./srcds_run -game cstrike -autoupdate +maxplayers 20 +map de_dust
Note: If you are not planning on using custom scripts to launch the server, Then I would recommend installing screen for your Linux distro , once installed run this version of the command.
screen ./srcds_run -game cstrike -autoupdate +maxplayers 20 +map de_dust
Once you close out your ssh session, the server will still be running and you can log back in and issue the following command to resume screen -r
This should cover everything you need for a basic Counter Strike Source Server.
Coming soon……. A mani admin self install script for those of you who hate to go through the installation process.
