Half-Life is the most popular multiplayer first-person shooter on the Internet as of this version of the HOWTO - mainly thanks to the modification Counter-Strike, hereafter referred to as CS.
The system requirements may vary depending on how many players you have on your server.
You need the HLDS dedicated server package to run an Half-Life server:
When you've downloaded the above file, create a directory for HLDS and extract the HLDS package to it.
bash$ mkdir /usr/local/games/hlds bash$ tar zxvf hlds_l3103.tar.gz -C /usr/local/games/hlds bash$ tar zxvf cs_10.tar.gz -C /usr/local/games/hlds |
Now we have to make it so hlds can see its dynamically linked libraries (*.so files). If you're running bash, which you most likely are, type:
bash$ export LD_LIBRARY_PATH=/usr/local/games/hlds:$LD_LIBRARY_PATH |
This adds /usr/local/games/hlds to the directories ld checks for libraries in.
bash$ hlds_l +maxplayers 12 +map crossfire |
At the end you should see something like this:
WON Auth Server . . . |
bash$ ./hlds_l +ip xx.xx.xx.xx +maxplayers 12 +map crossfire |
Extract it to your HLDS directory:
bash$ tar zxvf ~/cs_10.tar.gz -C /usr/local/games/hlds bash$ unzip ~/ln_cs10b.zip -d /usr/local/games/hlds |
Now run the CS server:
bash$ hlds_l -game cstrike +maxplayers 12 +map de_dust |
Edit the /usr/local/games/hlds/cstrike/server.cfg file to change it to your liking and optimize the server. The file mapcycle.txt contains the list of maps to be included in the map cycle, and motd.txt contains the MOTD - Message Of The Day.
Maps - maps that begins with cs_ are hostage maps, where the CT's job is to rescue the hostages and the T's to stop them, de_ is a defusion map where T's job is to plant the bomb at selected targets and CT's job is to eliminate the T's or defuse the bomb), es_ is an escape map where T's trying to escape from a prison-type secnario. By typing mp_timelimit 0 in the console, the server will go to the next map in the cycle. The commando changelevel followed by the mapname makes the server change to the specified map. The maps must be in your cstrike/maps directory.
For more information on CS servers, see http://server.counter-strike.net.