|
楼主 |
发表于 2005-4-11 17:02:33
|
显示全部楼层
来自 中国–福建–厦门
最多支持8个cpu,每个服务器可以选择任意一个或多个cpu来运行,官网有一篇专门写如何来启动cs各种服务器 http://configmaker.firedaemon.com/ 该页还能在你填入相关数据后立即生成你的服务器config(在firedaemon里调取) 今天刚发现ing :d: :d: :d:
Half Life Dedicated Server HOWTO and Configmaker
Introduction
This document will demonstrate how to create a Steam account for a dedicated game server, download the server files, install and configure a game mod, then set the game server to run as a service with FireDaemon.
Getting Started
First, create a folder where the files for the dedicated server will be located. In this tutorial, C:\HLServer will be used as the server directory. Verify 1-2 gB of free space is available on the drive.
Next, download the HLDSUpdateTool from here:
http://www.justclans.com/downloads/hldsupdatetool.exe
copying it into the C:\hlserver directory.
Set up the HLDS Steam Server Account
Just as the Steam Client requires an account to use it, so does the server. The next few sections need to be completed via the DOS command line. To get the command line:
Click Start, then Run, Type in “cmd” (no quotes needed) then click the OK button. Once the Command Prompt is up, change directory into the folder containing the file downloaded above. This is done with the following command:
cd C:\hlserver
Now create the server account using the following syntax:
hldsupdatetool -command create Cusername <username> -email <email> -password <password> -question <question> -answer <answer>
where:
-username <username> - Username of Steam account (case-insensitive)
-email <email> - Email address
-password <password> - Password for the account (case-sensitive)
-question <question> - Password reminder question
-answer <answer> - Password reminder secret answer (case- sensitive)
For this tutorial the username will be foobar and the password, pasSwoRd:
hldsupdatetool -command create -username foobar -email foo@bar.com -password pasSwoRd -question "cat's name?" -answer Gordo
The following output should be generated:
Checking bootstrapper version ...
Creating Account
Account Created successfully
Other text may also appear, but the above three lines are the most important C especially the “Account Created successfully.”
Download the Server Files
Now, download the HLDS server files that are required to run the server. Depending on your connection this could take from a few minutes to a few hours. Again, from the Command Prompt, enter this command:
hldsupdatetool -command update -game valve -dir c:\hlserver -username foobar -password pasSwoRd Cretry
which will download all the hlds server files, hltv, and the core game files (the “valve” game) using the HLDSUpdateTool.
Once finished retrieving the files, the text:
HLDS installation up to date
will appear.
Install Mods
After successfully updating the basic Steam server files, the particular mod(s) of interest, such as Counter-Strike, Day of Defeat, Team Fortress Classic, etc., must be downloaded. Valid mods for download are cstrike, dod, dmc, tfc, valve, czero, and ricochet. Third party mods such as Natural Selection, The Specialist, and others need to be setup with the installer provided by the mod team.
As before, the HLDSUpdateTool will be used from the Command Prompt. The mod is selected in the -game <gamemod> variable, where <gamemod> is the abbreviated form of the mod's name, as listed above. For example, to add the Counter-Strike mod:
hldsupdatetool -command update -game cstrike -dir c:\hlserver -username foobar -password pasSwoRd Cretry
Day of Defeat:
hldsupdatetool -command update -game dod -dir c:\hlserver -username foobar -password pasSwoRd Cretry
with the other mods following in a similar fashion. Third party mods such as The Specialist and Natural Selection will need to be manualy installed.
Basic Configuration
Once the mod(s) is installed, the server config file must be customized to reflect the correct rcon, server name (hostname) and friendly fire options.
In Windows Explorer, browse into you C:\hlserver\<MODNAME> folder and open the server.cfg file using Notepad or a similar text editing utility. For example to edit your Day of Defeat server config you would open
C:\hlserver\dod\server.cfg
Near the top of the page the hostname is defined: hostname "DoD v1.2" or hostname "Counter-Strike 1.6 Server". Change what is within the quotes to the desired name of the server, eg: hostname “Fubar's DoD 1.2 Server”.
To generate logs and gain RCON access to this server add the following lines to the config file:
log on
rcon_password "myrconpass"
replacing the myrconpass within the quotes to the desired password.
In the case of this tutorial, the server.cfg now contains the following:
hostname "Fubar's DoD 1.2 Server"
rcon_password "pasSwoRd"
log on
followed by the rest of the options.
Start the Server
At this point the server can be started. Using the Command Prompt, choose the desired game from the following list and enter the approriate command:
Day of Defeat:
hlds -console -game dod -port 27015 +exec server.cfg +maxplayers 16 +map dod_anzio
Counter Strike:
hlds -console -game cstrike -port 27015 +exec server.cfg +maxplayers 16 +map de_dust
Team Fortress Classic:
hlds -console -game tfc -port 27015 +exec server.cfg +maxplayers 16 +map rock2
Death Match Classic:
hlds -console -game dmc -port 27015 +exec server.cfg +maxplayers 16 +map dmc_seige
Condition Zero:
hlds -console -game czero -port 27015 +exec server.cfg +maxplayers 16 +map de_tides_cs
After entering the command, a console window will open and you should be able to add the server to your list in Steam, All Seeing Eye, HLSW, or other server browser you use.
Adding to FireDaemon
The FireDaemon application allows the operator of a dedicated Half-Life server to log out of the system without killing the game, restarts the game server should it crash, and restarts the server on system reboot. The game can be added to FireDaemon either manually, or using the service config builder for Half-Life on the right.
To add the service manually, open FireDaemon and follow these steps:
1: On the top tool bar click the first icon “Create a new service definition”.
2: Enter the name of your half-life server which cannot include any spaces.
3: Change the display name to be something a little more descriptive. The description is optional but will give other users an idea of what this particular service is.
4: Ensure the Console Application checkbox is checked. This will end the service smoother in the event it needs to be stopped.
5: Click the button next to the “executable” field to select the C:\HLServer\hlds.exe file, which sets the Executable to “hlds.exe” and the Working Directory to “C:\HLServer”.
6: Finally add the command line options as used in the “Start the Server” section above, this time omitting “hlds” part at the beginning. The parameters should look something like this:
-console -game dod -port 27015 +exec server.cfg +maxplayers 16 +map dod_anzio
7: Click on the Settings tab at the top. Change the “Upon Program Exit” time from 5000 to 10000, as recommended by Valve for Half-Life Dedicated Servers.
8: Click install. The server should start.
To add the game to FireDaemon using the service config builder, open FireDaemon and follow these steps:
1: On the top tool bar click the first icon “Create a new service definition”.
2: On the New Service Definition form, click the second icon on the tool bar “Open a service definition file ”.
Enjoy the game! |
|