Creating a Counter-Strike: Source/Half-Life 2: Deathmatch Server
Linux Setup Guide
- By Plasma
Step 1
Create a folder called srcds_l (Thats a lower case L for linux!), usually done in your home directory, where you want to base your server installation and have all content stored.
Step 2
Grab hldsupdatetool and put it in your srcds_l directory you just created.
Step 3
Make the hldsupdatetool executable via chmod.
Step 4
Run hldsupdatetool - This just extracts our steam client.
Say YES to agree to the following license prompt and your done.
Step 5
Now we will run the Steam client to download the game content.
Two game types are available:
For CS: Source, its: "Counter-Strike Source"
For HL2: Deathmatch, its: "hl2mp" (HL2 Multiplayer, not HL2DM).
To download CS: Source data files for a CS: Source server, type:
Hit ENTER and you should begin downloading the Counter-Strike Source data files in this directory (~/srcds_l).
This may take a while.
Note: Contrary to what typing ./steam on its own indicates, you DO NOT need to specify OR create a Steam account to download/update your servers.
This was originally a requirement but Valve have since removed it, and the help information has just not been removed from the Linux Steam client.
Once its finished, you will be able to then launch your dedicated server, this will create our initial config file and test everything is ok.
Step 6
Launching a dedicated server. We will launch a server with no determined config to see if everything was successful, and to create an initial config file in cstrike/cfg/server.cfg
Using our example from Step 5, to launch a CS: Source server you type:
Replace 'cstrike' in the above launch command with 'hl2mp' (MP! Not DM) to launch a HL2 Deathmatch server.
Be sure to replace 123.123.123.123 with the EXTERNAL IP you want your server to bind to, not the servers Internal/LAN IP.
Congradulations, your server should now be running!
Step 7
Edit your server configuration to your liking in cstrike/cfg/server.cfg
If it does not exist, create it.
Note: Read the following post in this thread if you would like to know how to setup multiple servers on the same host.
Additionally, you may want to launch your server as follows:
To place the server in a screen session you may detach from once its launched, or place the line in start_server.sh and exeucte it from the command line.
Step 8
Once your all set, in the event a Steam/game update has been released, you will need to update your hlds installation.
To do this, simply run the command we used in Step 5 to initially download our content:
This will update all files if needed in your installation directory to their latest versions.
Adding a cronjob for this command may be wise so you do not have to constantly remember to update your servers, and that they would be up to date within 24 hours of an update if scheduled to run daily.
Linux Setup Guide
- By Plasma
Step 1
Create a folder called srcds_l (Thats a lower case L for linux!), usually done in your home directory, where you want to base your server installation and have all content stored.
Step 2
Grab hldsupdatetool and put it in your srcds_l directory you just created.
Step 3
Make the hldsupdatetool executable via chmod.
Code:
chmod +x hldsupdatetool.bin
Run hldsupdatetool - This just extracts our steam client.
Code:
./hldsupdatetool.bin
Step 5
Now we will run the Steam client to download the game content.
Two game types are available:
For CS: Source, its: "Counter-Strike Source"
For HL2: Deathmatch, its: "hl2mp" (HL2 Multiplayer, not HL2DM).
To download CS: Source data files for a CS: Source server, type:
Code:
./steam -command update -game "Counter-Strike Source" -dir .
This may take a while.
Note: Contrary to what typing ./steam on its own indicates, you DO NOT need to specify OR create a Steam account to download/update your servers.
This was originally a requirement but Valve have since removed it, and the help information has just not been removed from the Linux Steam client.
Once its finished, you will be able to then launch your dedicated server, this will create our initial config file and test everything is ok.
Step 6
Launching a dedicated server. We will launch a server with no determined config to see if everything was successful, and to create an initial config file in cstrike/cfg/server.cfg
Using our example from Step 5, to launch a CS: Source server you type:
Code:
./srcds_run -console -game cstrike -port 27015 +ip 123.123.123.123 +map de_dust +maxplayers 14
Be sure to replace 123.123.123.123 with the EXTERNAL IP you want your server to bind to, not the servers Internal/LAN IP.
Congradulations, your server should now be running!
Step 7
Edit your server configuration to your liking in cstrike/cfg/server.cfg
If it does not exist, create it.
Note: Read the following post in this thread if you would like to know how to setup multiple servers on the same host.
Additionally, you may want to launch your server as follows:
Code:
screen -S css ./srcds_run -console -game cstrike -port 27015 +ip 123.123.123.123 +map de_dust +maxplayers 14
Step 8
Once your all set, in the event a Steam/game update has been released, you will need to update your hlds installation.
To do this, simply run the command we used in Step 5 to initially download our content:
Code:
./steam -command update -game "Counter-Strike Source" -dir .
Adding a cronjob for this command may be wise so you do not have to constantly remember to update your servers, and that they would be up to date within 24 hours of an update if scheduled to run daily.
ไม่มีความคิดเห็น:
แสดงความคิดเห็น