windgao 发表于 2005-6-22 00:30:31

在Linux下构建(CS/CZ),原贴+中文翻译

刚才在国外找到了一个好东西
These instructions will instruct you how to create & set up a LINUX CS 1.6 *or* Condition Zero Server.

You will need:
* A running Linux system.
* An internet connection.
* Basic Linux knowledge.
* Basic HLDS administration.
* You should have `screen` installed.
* OPTIONAL: root account
* OPTIONAL: access to your firewall/router if the server is behind a firewall or router


Hardware requirements:
* An Intel or preferably AMD processor at at least 1Ghz
* Recommended 2Ghz for a 20 players smooth-running game server
* 256MB of RAM
* 512MB recommended
* Cable/DSL 512KBPS (this supports around 10 players)
* Fiber @gay.ru или sexypopka@ 10Mb recommended
* At least 500MB of free disk space. (for logs and stuff)

If you don't meet the requirements please don't bother reading everything else...

Let's start.

Step 1.
Log into your box as root, add an account, let's say "game" (without the quotes). Now log in as 'game' with your password on a console, over ssh or whatever... If you don't have root access to that box, don't worry, just log in with your username and password. We will work in your $HOME directory (e.g. /home/game).
Now, create a directory where you'll store your HLDS. For convenience we will name this directory hlds_l.
Quote:
$ mkdir hlds_l

Step 2.
Download the Linux steam tool from here: http://www.computergames.ro/download.php/optiune-show_download/did-1596/index.html
and follow the instructions on that page.
You should now have a "steam" binary in your $HOME directory (/home/game)

Step 3.
Get a steam account for your hlds following the instructions on that page.

Step 4.
Get the content for your LINUX hlds. This is fairly easy and it's the most important step . Type this in your $HOME directory (/home/game). Replace your-username, your-password with your username and password.
For CS 1.6
Quote:
$ ./steam -command update -dir $HOME/hlds_l -game CStrike -username <your-username> -password <your-password> -remember_password -verify_all

For CS: Condition Zero
Quote:
$ ./steam -command update -dir $HOME/hlds_l -game czero -username <your-username> -password <your-password> -remember_password -verify_all


*** Don't forget to replace <your-username> and <your-password> with your username and your password (of your steam account you created on Step 2.) ***

Now wait to get your content

Step 5.
Now you should have a vanilla hlds_l running . Let's create a start-up script for your CS 1.6/Condition-Zero server.
With your favourite text editor, do this:
$ cd $HOME/hlds_l
$ pico CS-go
Now, the file CS-go should contain this:
Quote:

#!/bin/sh
cd $HOME/hlds_l
export LD_LIBRARY_PATH=$HOME/hlds_l:$LD_LIBRARY_PATH
/usr/bin/screen -A -m -d -S CS ./hlds_amd -game CStrike +sv_lan 1 +maxplayers 18 +map de_aztec +log on -pingboost 2

Now for an explanation:
* ./hlds_amd is the binary you should run on a AMD CPU. I'm using this even on a INTEL CPU because at the moment of this writing I wasn't able to find a cracked engine_i686.so file
* -game CStrike is the name of the mod you are running. use -game czero for Condition Zero.
* +sv_lan 1 you need this!
* +maxplayers 18 this is the maxplayers your server will support. Replace this with how many players you want to have (carefull... don't run a 32 one if you don't have a good enough CPU)
* +map de_aztec this is the first map your server will start with upon starting it/restarting it
* +log on this turns the logging ON (required for psychostats)
* -pingboost 2 hlds's pingbooster. Play around with this value and see what's best for your machine. Possible values: 1 2 or 3

Step 6.
Crack your hlds server. Basic: download the cracked engine*.so, replace it and you're done.
NOTE: At the moment of writing I wasn't able to find a cracked engine for i686 platforms.
Quote:

$ cd $HOME/hlds_l
$ wget ftp://ftp.cablenet.com.pe/games1/steam/offline/V11/server/engine_amd.zip
$ gunzip engine_amd.zip


Done.
Now test your server with the CS-go script:
Quote:

$ HOME/hlds_l/CS-go
* it won't return anything. switch to the screen *
$ screen -rx CS
* you should now see your server output*
* to detach type: Ctrl+A then Ctrl+D *


You should have it running without any problems...

Optional: Step 7.
Set your server to run automatically on reboot.
Add the following line in your /etc/rc.d/rc.local
Quote:
su <your hlds user> -c $HOME/hlds_l/CS-go


Questions:
* How about metamod/amxx/adminmod ?
* www.amxmodx.org // www.adminmod.org // www.metamod.org

Something else? Post here.
_________________

stonelei 发表于 2005-6-22 00:39:45

:d:
谢谢.我找到了,不知是不是这个:

http://www.dt-club.net/showthread.php?t=21180&highlight=3147

windgao 发表于 2005-6-22 00:42:55

我找不到我说的那个地址了.但是我又找了一个好资料啊。呵呵.够经典的.
呵呵

金闪闪 发表于 2005-6-24 08:23:26

需要翻译,没几个人看得懂。
否则就成资料保留了。:D

dnarh 发表于 2005-6-24 10:15:51

是啊是啊,翻译

frank 发表于 2005-6-24 17:49:21

汗。老外居然不用vi ,用pico编辑

我觉得steam官方这个说明也挺详细的
http://forums.steampowered.com/forums/showthread.php?threadid=292495

WeeVee 发表于 2005-6-25 22:08:53

啊!有是鹰文~

chenyufan 发表于 2005-6-28 00:26:59

我也来跟一帖:
Steam and Cs1.6 Install Guide


--------------------------------------------------------------------------------

Install Guide:


Intro:

This Guide is written for help with installing the new steam linux 1.6 server.
It will take you step by step through the installation until you have a basic Counter-Strike server running.


Requirements:


Acces to Linux server with ssh, or your own server with a keybord.
An Internet connection on the linux server.
An homedir where you have write acces.
Enough space on your hard drive, 600Mb At least.
wget or an ftp program.
Gzip unpack program.


Guide:

Ok, Lets get started.
Go to your homedir and lets make a new dir for the server, and then go into that dir.
Should you already have a installation you want to update, just use the hlds_l dir you using now

   mkdir hlds_l

Now lets go in the dir.

   cd hlds_l

Now we are going to download the steam install files (file is called steam) I use wget here to get the file.
If you are having problems downloading this file from this location there are some mirrors listed at the bottom of this page.
if your linux doesnt have wget, use the http/ftp program provided with your distribution to get it.

   wget http://users.lichtsnel.nl/~jap/steam/steam.tar.gz

We now have the file we need, now lets unpack it!

   tar -zxvf steam.tar.gz

Now make sure it executable.

   chmod +x steam

now lets runs steam:

   ./steam

it will response with:

   Checking bootstrapper version ...
   Getting version X of Steam HLDS Update Tool
   Downloading. . . . . . . . . . .
   Steam Linux Client updated, please retry the command

Now we are all ready to start getting an acount for steam, and to get the files!
The thing we are going to do is create an account for our dedicated server, ill give the correct syntax plus an example:

   ./steam -command create -username <username> -email <email> -password <password> -question <question> -answer <answer>

   ./steam -command create -username Japje -email jap@valvesoftware.com -password hard2guess -question "does steam r0x?" -answer yes

Now you know how it must be done, so lets do it, go make an account.

After creating the account steam will response with:

   Checking bootstrapper version ...
   Creating Account
   Account Created successfully

So we now have an updated steam client, and an account for this server, cool huh now lets get those server files.

   ./steam -command update -game <game> -dir /path/to/your/hlds_l -username <username> -password <password> -remember_password

As you can see we can choose our game, install dir, with our username and password we just created,
and putting -remember_password at the end will make sure it remembers the password.
The install dir is the path to the hlds_l dir we made in the beginning, ill use /home/jap/hlds_l as an example.

   ./steam -command update -game cstrike -dir /home/jap/hlds_l -username Japje -password hard2guess -remember_password

if you typed it correctly it will response with:

   No installation record found at /home/jap/hlds_l
   Checking/Installing 'Counter-Strike Base Content' version XX

It will now start downloading files, go and watch tv, come chat in the irc channel, it will take some time.
Dont worry about the no installation record found error, its just an message that it didnt found any installion, since its the first time


If steam is done downloading all those files, you will be back at the prompt, and you basicly now have an ready to use cs server
you can test the server if it works with:

   ./hlds_run -game cstrike +map de_dust -autoupdate

This wil run the most basic cs server with the map de_dust.
The option -autoupdate will make sure that if there is a Counter-Strike game update that it wil download it Automaticly

Because we made steam remember our password, all we need to do to update next time is run:

   ./steam -command update -game <game>

Thats all, How to config the server, thats all up to you, that im hoping, i dont need to explain.
I wish you best of luck with your new Dedicated Linux Counter-Strike Server!
I would like to thank the whole valve team for 2 things, this linux version, and the use of their Readme file while creating this guide!

If there are tips/suggestions/errors plz do mail them to me so i can change it! mail: cs16@japje.nl


Also if you have any questions or you just want to chat, join us on irc:
for server problems/questions:
#counter-server on Gamesurge
or for chatting:
#steam-hangout on Gamesurge

Mirrors for steam.tar.gz

http://users.lichtsnel.nl/~jap/steam/steam.tar.gz
http://68.90.68.35/steam.tar.gz
http://japje.nl/steam/steam.tar.gz
http://teh$$$$h0le.net/japje/steam.tar.gz

Songsong 发表于 2005-6-28 02:07:03

随手翻译的~一路下来没检查,有错误自己解决


刚才在国外找到了一个好东西
These instructions will instruct you how to create & set up a LINUX CS 1.6 *or* Condition Zero Server.
这些介绍将指导你怎样创建与建立起Linux的CS1.6或者CZ服务器

You will need:
* A running Linux system.
* An internet connection.
* Basic Linux knowledge.
* Basic HLDS administration.
* You should have `screen` installed.
* OPTIONAL: root account
* OPTIONAL: access to your firewall/router if the server is behind a firewall or router
你将需要:
一套正在运行的Linux系统
一条互联网接入
一些基础的Linux知识
一些HLDS超级管理方面的内容
你需要一个终端来完成安装
可选:Linux超级帐号
可选:如果在防火墙/路由背后,您需要可以穿透的能力或权限


Hardware requirements:
* An Intel or preferably AMD processor at at least 1Ghz
* Recommended 2Ghz for a 20 players smooth-running game server
* 256MB of RAM
* 512MB recommended
* Cable/DSL 512KBPS (this supports around 10 players)
* Fiber @gay.ru или sexypopka@ 10Mb recommended
* At least 500MB of free disk space. (for logs and stuff)
硬件要求
Intel或者更加适宜的AMX处理器,主频至少在1G以上(支持12人)
推荐20人的配置采用2G以上的主频以取得流畅效果
256M的内存
512M内存是推荐的
基于512K速率的Cable/DSL接入(这样大概支持10人)
光纤推荐(这里涉及到俄罗斯的ISP,省略)国内南方推荐电信,北方推荐网通
至少500M的磁盘空间(日志及扩展)


If you don't meet the requirements please don't bother reading everything else...
如果你达不到要求,继续读下去已经没有意义..........

Let's start.

Step 1.
Log into your box as root, add an account, let's say "game" (without the quotes). Now log in as 'game' with your password on a console, over ssh or

whatever... If you don't have root access to that box, don't worry, just log in with your username and password. We will work in your $HOME directory (e.g.

/home/game).
Now, create a directory where you'll store your HLDS. For convenience we will name this directory hlds_l.
Quote:
步骤一
作为超级用户root登陆到你的机器,创建一个帐号,我们称为"game"(不带引号),现在使用创建的gam帐号登陆到控制台,登陆工具可以采用SSH或者其它,如果你没有超级用户权限,不要担心,您同样可以使用您自己权限的帐号登陆,我们进行的内容同样会在你的工作目录下运行,比如/home/game下


Step 2.
Download the Linux steam tool from here: http:www.computergames.ro/download.php/optiune-show_download/did-1596/index.html
and follow the instructions on that page.
You should now have a "steam" binary in your $HOME directory (/home/game)
步骤二
从这里下载Linux的Steam工具http:www.computergames.ro/download.php/optiune-show_download/did-1596/index.html,并根据页面上的指导操作
你应该在你的目录下有一个Steam二进制文件


Step 3.
Get a steam account for your hlds following the instructions on that page.
步骤三
根据页面提示获得Steam帐号


Step 4.
Get the content for your LINUX hlds. This is fairly easy and it's the most important step . Type this in your $HOME directory (/home/game). Replace

your-username, your-password with your username and password.
For CS 1.6
Quote:
步骤四
获得你Linux的HLDS内容,这非常容易同时也是最重要的步骤,将这些键入你的主目录,替换为你的用户名与密码


For CS: Condition Zero
关于CS:CZ
Quote:
引用


*** Don't forget to replace <your-username> and <your-password> with your username and your password (of your steam account you created on Step 2.) ***
***不要忘记替换用户名与密码***
Now wait to get your content
现在等待去获得您的内容

Step 5.
Now you should have a vanilla hlds_l running . Let's create a start-up script for your CS 1.6/Condition-Zero server.
With your favourite text editor, do this:

Now, the file CS-go should contain this:
Quote:
步骤5
现在你已经拥有正在运行的HLDS,我们可以创建启动脚本来运行你的CS16或者CZ


Now for an explanation:
需要解释的是:
* ./hlds_amd is the binary you should run on a AMD CPU. I'm using this even on a INTEL CPU because at the moment of this writing I wasn't able to find a

cracked engine_i686.so file
*./hlds_amd适用与你使用AMD的CPU.我使用Intel的CPU,原因是我此时无法获得相关的破解文件

* -game CStrike is the name of the mod you are running. use -game czero for Condition Zero.
* -game CStrike是你运行的MOD名字,-game czero适用与CZ

* +sv_lan 1 you need this!
* +sv_lan 1 你需要这么做!

* +maxplayers 18 this is the maxplayers your server will support. Replace this with how many players you want to have (carefull... don't run a 32 one if you

don't have a good enough CPU)
* +maxplayers 18这是你服务器支持的人数,替换这个数字使之符合你的需要,注意的是不要运行在32人如果你没有足够好的CPU

* +map de_aztec this is the first map your server will start with upon starting it/restarting it
* +map de_aztec 开机运行的第一张地图是吊桥

* +log on this turns the logging ON (required for psychostats)
* +log on日志记录开关(这是psychostats所需要的)

* -pingboost 2 hlds's pingbooster. Play around with this value and see what's best for your machine. Possible values: 1 2 or 3
* -pingboost 2 是HLDS的加速器,根据你的机器来设置这数字,有效值是1,2,3

Step 6.
Crack your hlds server. Basic: download the cracked engine*.so, replace it and you're done.
NOTE: At the moment of writing I wasn't able to find a cracked engine for i686 platforms.
Quote:
步骤6
破解你的HLDS服务器,下载破解文件并覆盖
提示:此时我我方获得基于i686引擎的破解文件

下面是终端命令
$ cd $HOME/hlds_l
进入HLDS目录,其中$HOME是你的HLDS以上各级目录层

$ wget ftp:ftp.cablenet.com.pe/games1/steam/offline/V11/server/engine_amd.zip
使用wget下载文件

$ gunzip engine_amd.zip
解开文件


Done.
完成后
现在使用CS-GO测试你的机器
Now test your server with the CS-go script:
Quote:
引用


* it won't return anything. switch to the screen *
不会回显任何东西
$ screen -rx CS
* you should now see your server output*
查看服务器输出
* to detach type: Ctrl+A then Ctrl+D *
分开类型: Ctrl+A -> Ctrl+D

You should have it running without any problems...
您应该使之运行并且没有问题

Optional: Step 7.
选项:步骤7
Set your server to run automatically on reboot.
设置你的服务器使之随机启动CS

Add the following line in your /etc/rc.d/rc.local
添加以下行到你的 /etc/rc.d/rc.local
Quote:
引用以下命令:
su <your hlds user> -c $HOME/hlds_l/CS-go



提示:这是一篇非常简单的关于在Linux下构建服务的文章,原来作者应该是俄罗斯的,文章中所说的CS-GO我估计是一个CS启动类型的文件,完全可以在Linux利用Shell构建.sh文件来执行

BoeZombie 发表于 2005-6-28 02:15:41

几位版主,齐心协力,再创辉煌,哇哈哈~~~~
页: [1] 2
查看完整版本: 在Linux下构建(CS/CZ),原贴+中文翻译