越简单越好!

Setting up a Linux non-Steam Counter-Strike 1.5 Server

bevin 发表于 2012-10-21 15:20 | 91次阅读 0次推荐   杂七杂八

Most of these are the same instructions you can find on the "noWON CS1.5 server" page over at No WON. I have simplified, reorganized and rephrased them so that (hopefully) they will make better sense.

Once you've followed these instructions your server will be accessible from the internet via the WON2 network. Be sure to patch your client with the No-WON / WON2 Patch for Playersthen use the in-game browser to find your server.

ServerInfo (Win32) is very useful for keeping tabs on your server while you are doing other things.

  1. Get the following packages:

    The above links have all been localized, so the files should always be there.

  2. Extract the above files in the order they're listed. Customize the configs and add your mods (AMX, etc.) If you don't know how to do this you can find the basics in the Linux CS Server How-To on Counter-Server. If they remove it I've got a copy archived here.

  3. Replace /hlds_l/valve/valvecomm.lst with this file

  4. If any of the following describes you:


    • You do not intend to use any anti-cheat addons
    • You intend to use HLGuard (recommended)
    • You intend to use Cheating-Death (This is definitely not recommended. Cheating-Death does not officially support the WON(2)/Half-Life system anymore and the latest version doesn't work at all on the server side. Pre 4.30.x versions work with CS 1.5, however they cause lag on both the server and the client.)


    Then edit /hlds_l/cstrike/liblist.gam and change secure "1" to secure "0"

    If instead of the above options you intend to use WON2VAC then leave liblist.gam alone. Note that WON2VAC will ban anyone running the Cheating-Death client who attempts to connect to your server.

  5. Create a file in /hlds_l/ called nowon.c with just one line: int NET_IsReservedAdr(){return 1;}

    In the same directory, type these commands:

    1. gcc -c nowon.c -o nowon.o
    2. ld -shared -o nowon.so nowon.o


  6. Edit /hlds_l/hlds_run and under the first "export" line add this:

    export LD_PRELOAD=/.../hlds_l/nowon.so
    Be sure to substitute the full path to your hlds_l directory in place of the "...".


  7. Edit the script you use to start your server and add +sv_lan 1 to it.

  8. Now you should have a working server. Unfortunately HLDS 3.1.1.1 has a known security hole that allows anyone to crash it. You may want to start your server anyway and join so that you know it works, then shut it down and follow the rest of these steps to patch this hole in HLDS.

  9. Download this file to your /hlds_l/ directory (It comes from this site).

  10. In /hlds_l/ type the following command:

    gcc -s -O3 -D_GNU_SOURCE -fPIC -shared -ldl -o hlds_20040707fix.so hlds_20040707fix.c


  11. Edit /hlds_l/hlds_run and change the "export" line you created in step 6 to this:

    export LD_PRELOAD="/.../hlds_l/nowon.so /.../hlds_l/hlds_20040707fix.so"
    As before, be sure to substitute the full path to your hlds_l directory in place of both "...".


  12. Your server is now working and slightly more secure. You can add more security by incorporating the chroot patch from the site in step 9 and running HLDS in a "chroot jail". Compiling and using the HLDS chroot patch is easy, however creating the jail is beyond what I have spare time to deal with right now (let alone document). If anyone has some good instructions for this please post them to the Steamless CS Project Forum.

+0
发表评论
×您的大名会显示在评论处

评论内容不能少于5个字哦~~~

评论列表
当前暂无评论
发送数据中... 请求错误. 请输入评论内容和验证码后再发布 您已经参与过了,谢谢
返回顶部 ^