Difference between revisions of "Half-Life Dedicated Server"

From SME Server
Jump to navigationJump to search
(New page: The following How-to will help you setup your SME Server to be a Half-Life Dedicated Server for games like Half-Life, Counter-Strike: Source, etc... ==Creator== [http://forums.contribs.or...)
 
m (Removed creator (as this is a howto) and some text changes)
 
(7 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
==Introduction==
 
The following How-to will help you setup your SME Server to be a Half-Life Dedicated Server for games like Half-Life, Counter-Strike: Source, etc...
 
The following How-to will help you setup your SME Server to be a Half-Life Dedicated Server for games like Half-Life, Counter-Strike: Source, etc...
 
+
Information on this page is based on [http://forums.contribs.org/index.php?topic=37402.0 this thread] in the SME Server forums.
==Creator==
 
[http://forums.contribs.org/index.php?action=profile;u=12478 Paulus] - Wiki entry "stolen" from [http://forums.contribs.org/index.php?topic=37402.0 this thread].
 
  
 
==Create new user==
 
==Create new user==
First off we are going to make a user called: hlds. It is better if we don't run our server as root, but rather we run it as a normal user, just so that their is less chances of a security breach.
+
First off we are going to make a user called: hlds. It is better if we don't run our server as root, but rather we run it as a normal user, just so that there is less chances of a security breach.
  
 
To create a new user you will need to login as root to perform the following steps:
 
To create a new user you will need to login as root to perform the following steps:
#Enter this from the command line <pre>adduser hlds</pre> This will make a new user on our server with the username as hlds. You can choose a different username if you so wish, but making it hlds will clearly show what the user account is used for.
+
#Enter this from the command line: <pre>adduser hlds</pre> This will make a new user on our server with the username as hlds. You can choose a different username if you so wish, but making it hlds will clearly show what the user account is used for.
#A prompt will appear where you can give the user hlds a password. Type the following:<pre>passwd hlds</pre> Of course you can choose a different password if you so desire...
+
#Type the following:<pre>passwd hlds</pre> A prompt will appear where you can give the user hlds a password.
 
#Now logout of root and login as hlds.
 
#Now logout of root and login as hlds.
  
Line 21: Line 20:
 
#To run the hldsupdatetool, issue this command: <pre>./hldsupdatetool.bin</pre>
 
#To run the hldsupdatetool, issue this command: <pre>./hldsupdatetool.bin</pre>
 
#Say yes the the licence agreement. The hldsupdatetool will uncompress and extract some files. We now need to run the updater so it can update itself. To do this, type: <pre>./steam</pre> The update shouldn't take to long depending on your internet connection.
 
#Say yes the the licence agreement. The hldsupdatetool will uncompress and extract some files. We now need to run the updater so it can update itself. To do this, type: <pre>./steam</pre> The update shouldn't take to long depending on your internet connection.
 +
 +
 +
==Install Game==
 +
After hlds has updated you need to decide what game you want to install. For this how to I will just be installing a normal Half-Life server, but you are free to install a cstrike or czero etc... server if you so desire.
 +
 +
To update the server, issue the following command: <pre>./steam -command update -game valve -dir /home/hlds</pre> This will tell hlds to get all the files required for a normal Half-Life server. If you want to have a counterstrike server, all you need to do is change the -game valve to -game cstrike Or if you want condition zero: -game czero I don't know the commands for any other games, but they should be fairly easy to find using google.
 +
 +
Getting the game files '''may take some time''', but after hlds has downloaded them, you'll be back at the prompt.
 +
 +
==Start Server==
 +
Before we start our server, we need to issue the following command: <pre>export LD_LIBRARY_PATH=/home/hlds:$LD_LIBRARY_PATH</pre>
 +
Now we can start our server. Use the following command to start your server. If you are running a different game or don't like the command I'm using, feel free to change it to suit your needs. <pre>./hlds_run -game valve +map crossfire +maxplayers 4 +port 27015</pre>
 +
Hopefully your server has started. If it has, you can go on to customizing it!
 +
 +
==Feedback?==
 +
Please post back in [http://forums.contribs.org/index.php?topic=37402.0 this thread] if you have any feedback.
 +
 +
[[Category:Howto]]

Latest revision as of 08:34, 5 October 2007

Introduction

The following How-to will help you setup your SME Server to be a Half-Life Dedicated Server for games like Half-Life, Counter-Strike: Source, etc... Information on this page is based on this thread in the SME Server forums.

Create new user

First off we are going to make a user called: hlds. It is better if we don't run our server as root, but rather we run it as a normal user, just so that there is less chances of a security breach.

To create a new user you will need to login as root to perform the following steps:

  1. Enter this from the command line:
    adduser hlds
    This will make a new user on our server with the username as hlds. You can choose a different username if you so wish, but making it hlds will clearly show what the user account is used for.
  2. Type the following:
    passwd hlds
    A prompt will appear where you can give the user hlds a password.
  3. Now logout of root and login as hlds.

Install hldsupdatetool.bin

  1. Enter this from the command line:
    wget http://storefront.steampowered.com/download/hldsupdatetool.bin
  2. Once it has finished downloading, issue the following command to make it an executable:
    chmod +x hldsupdatetool.bin
  3. Now logout of hlds and login as root.
  4. Navigate your way to the hlds user folder:
    cd /home/hlds
  5. We need to enable gunzip or something like that so we can run the hldsupdatetool. To do this, issue this command:
    ln -s /usr/bin/gunzip /usr/bin/uncompress
  6. Now logout of the root account and log back in as hlds.
  7. To run the hldsupdatetool, issue this command:
    ./hldsupdatetool.bin
  8. Say yes the the licence agreement. The hldsupdatetool will uncompress and extract some files. We now need to run the updater so it can update itself. To do this, type:
    ./steam
    The update shouldn't take to long depending on your internet connection.


Install Game

After hlds has updated you need to decide what game you want to install. For this how to I will just be installing a normal Half-Life server, but you are free to install a cstrike or czero etc... server if you so desire.

To update the server, issue the following command:

./steam -command update -game valve -dir /home/hlds

This will tell hlds to get all the files required for a normal Half-Life server. If you want to have a counterstrike server, all you need to do is change the -game valve to -game cstrike Or if you want condition zero: -game czero I don't know the commands for any other games, but they should be fairly easy to find using google.

Getting the game files may take some time, but after hlds has downloaded them, you'll be back at the prompt.

Start Server

Before we start our server, we need to issue the following command:

export LD_LIBRARY_PATH=/home/hlds:$LD_LIBRARY_PATH

Now we can start our server. Use the following command to start your server. If you are running a different game or don't like the command I'm using, feel free to change it to suit your needs.

./hlds_run -game valve +map crossfire +maxplayers 4 +port 27015

Hopefully your server has started. If it has, you can go on to customizing it!

Feedback?

Please post back in this thread if you have any feedback.