root access via SSH, telnet, or other.. Alternately, access from the server administrator to run a counter-strike server, and the proper access rights to do so. Enough free disk space (and allowed to use this much, eg disk quota): 600MB (CS 1.6), 800MB (CZ), 1.2GB (CS).
A fast internet connection (at least fast ADSL or Cable).
A decent computer, mattering on how many users (IMO : minimum celeron 1.8ghz, 512 mb of ram)
Login as root
passwd cstrike (give it a pw)
su cstrike (become that user)
cd ~ (go to your home directory, or wherever you want to run HLDS aka Half-Life dedicated Server from)
Alternately, we can assume our home directory is: /home/cstrike/
So we would type: cd /home/cstrike/
(get Steam now)
current link for linux hlds:
Inside console type: wget
once it is downloaded, type the following:
chmod +x hldsupdatetool.bin
*** You will now see the license agreement, review it carefully at your own risk ***
It will prompt for something like..
Do you agree: (type Yes)
** The current version of the steam client updates itself, if it just shows you a help menu, then read lower. **
Valid game types:
"cstrike" - Counter-Strike 1.6
"dmc" - Death Match Classic
"dod" - Day of Defeat
"tfc" - Team Fortress Classic
"ricochet" - Ricochet
"valve" - Normal Half-Life 1 Deathmatch (use this also for a custom mod)
"hl2mp" - Half-Life 2 Multiplayer - use this for half-life 2 mods as well
"Counter-Strike Source" - self-explanatory, make sure you use quotes
./steam -command install -game "<game>" -dir hlds
This will take some time, so please be patient. It can take above 3 hours in some cases.. Enough free disk space is required on your hard drive: 600MB (CS 1.6), 800MB (CZ), 1.2GB (CS).
I suggest if you plan on running more than one that you keep the first installation, and simply make copies of it as you move along.
If you want to add a mod later:
./steam -command update -game "<game>" -dir hlds
This will also update HLDS and/or the game to the latest version, if it already exists.
(I put quotes around <game> just to make sure it works properly)
You can change -dir hlds to anything you want, including a specified install directory that does not already exist, eg /home/cstrike/hlds/ (it will create HLDS)
In our case, let us assume that HLDS is in /home/cstrike/hlds/, and we installed cstrike (Please note: Half-life 2 instructions are a little different. They are lower down.)
-- edit server.cfg, mapcycle.txt, and motd.txt --
Each box has a different editor, some ways you can do this are:
**Scroll to the end for a few guides on the text editors.
I suggest pico or nano, as they are the easiest to navigate. If it wants you to press ^X it means press CTRL-X.
Server.cfg is pretty self-explanatory. If you want a server that has no timelimit, where it says in server.cfg "mp_timelimit 20", change that to "mp_timelimit 0".
Do the same for mapcycle.txt (adjust the maps to be played on your server)
You can adjust motd.txt to whatever you want, even use HTML tags, or you could just leave it alone.
We are assuming you installed Counter-Strike Source.
Go to the url:
Easiest way of making a server configuration file... Place it in the cstrike directory (eg /home/cstrike/hlds/cstrike
/) in this case.
I will be using our example again, so..
cd /home/cstrike/hlds/ (directory for HLDS)
./hlds_run -game cstrike +maxplayers # +ip xxx.xxx.xxx.xxx +port 270xx +exec server.cfg &
./srcds_run -game cstrike +maxplayers # +ip xxx.xxx.xxx.xxx +port 270xx +exec server.cfg &
Please note: Do not leave any values of # or x as they are.
ip is self-explanatory, if you do not understand, remove the line: +ip xxx.xxx.xxx.xxx
I also suggest that if you don't understand port to remove that line as well.
& puts the program in the background (eg after you log out the server will still run)..
It is also very useful to do the following thing:
Inside put the same line as you would have above, e.g.:
./hlds_run -game cstrike +maxplayers 16 +ip 192.168.1.10 +port 27021 +exec server.cfg &
./srcds_run +ip xxx.xxx.xxx.xxx +port 270xx +exec server.cfg &
Save and exit, then type: chmod +x startserver.sh
Now you can start your server by typing: