How to quickly set up a CS server in Linux

Source: Internet
Author: User
Tags gz file

Note: The cs1.4 version is used in this article, but the setup principles of 1.5 and 1.6 are basically the same. You can modify them accordingly.

First, you need to download two files. hlds_l_3109_full.bin cs_14_full.tar.gz, and then install the file. First, you need to decompress the file:

Chmod + x hlds_l_3109_full.bin

./Hlds_l_3109_full.bin

The protocol option is displayed. Enter "yes" and the hlds_l_3109_full.tar.gz file will be released.

Tar zxvf hlds_l_3109_full.tar.gz

Release the HLDS_L directory (this is the entire directory of the server) and start to install the CS1.4 mode.

Tar zxvf cs_14_full.tar.gz

To release the hosts file, save the following steps)

Cp-a cstrike hlds_l/is followed by setting the server. cfg file: (The following is already done. Copy it directly)

Sv_cheats 0

Hostname "CSchina.net CSServer" // server name

Mp_timelimit 45 // map change time

Mp_c4timer 45 // bomb countdown time

Mp_chasecam 0 // whether the camera is fixed (if you select 1 to enter the server, you can only watch the battle in a fixed location; otherwise, those not added to the team can watch it freely)

Mp_falldamage 1 // falling from a height to kill

Mp_flashlight 1 // whether there is a tactical flashlight

Mp_footsteps 1 // whether footsteps exist

Mp_freezetime 4 // set the time for each purchase

Mp_friendly_grenade_damage 1 // do you want to detect the damage caused by shoulei Youjun?

Mp_friendlyfire 0 // Do You Want To Hurt Youjun?

Mp_autoteambalance 2 // automatically adjust the minimum number of people difference between the two parties

Mp_roundtime 4 // maximum time per round

Rcon_password ***** // server password, which is set by yourself in the * Section

Mp_limitteams 2 // if both parties exceed N persons, the system automatically adjusts the value N to a number.

Mp_tkpunish 1 // Do You Want To Hurt Youjun's punishment?

Mp_mapvoteratio 0.2 // voting rate

Mp_logfile 1 // whether the server leaves a record file

Log on // start record

Mp_playerid 0 // The Name Of all people can be seen in the status bar; 1 is the name of only one person can be seen; 2 is the name of no one can be seen; 0 is the default.

Mp_fadetoblack 0 // The screen turns black after the death of the character, and 0 remains unchanged. 0 is the default value.

Mp_forcechasecam 0 // after death, you can view it at will. 1 can view your own, 2 can view the camera angle. 0 is the default value.

Mp_buytime 90 // time when you can purchase an item. For example, if mp_buytime 1.8 is 108 seconds, you can purchase an item. The default value is 1.5 minutes.

Mp_winlimit 17 // when a party wins 17 times, change the map.

Allow_spectators 1 // The Observer angle is allowed. 0 is not allowed, and 1 is allowed. 1 is the default value.

Mp_hostagepenalty 3 // within the specified time when more than three persons are automatically kicked out

Cl_dynamiccrosshair 0 // whether to use a Dynamic Quasi-star, 0 is not allowed, 1 is allowed. The default value is 0.

Mp_logmessages 1 // open the log to download and install the latest server patch. Currently, it is 3.1.0.9c. The installation method is basically the same as above and will be overwritten after expansion, now you have to create a shortcut file to start the server. Otherwise, you have to enter a large command every time, which is too troublesome.

Go to the hlds_l directory and create the quick Startup File CS. Open the editor. You can use any one of them, such as pico.

  

Pico cs input #/bin/bash/

./Hlds_run-restart-game cstrike + port 27020 + maxplayers 20 + map de_inferno

Save disk and exit

-The restart parameter is used to automatically restart the cs server when the process is down. Speaking of this, I think of one thing. A friend I just met, he made a linux server process guard Program (it is estimated that other games or software can be used ), in addition to the features I mentioned above, it can also prevent malicious Shutdown (for example, if someone else gets your op password or the OP accidentally enters exit to close the server ).

I tested it. Whether I use the op password to enter exit to shut down the server or kill all CS processes on the server, it will automatically restart the server process, unless you kill the program, if you can kill the program, it is estimated that your server has lost control, and most people will not shut down the process themselves!

Now the quick file has been created, but it cannot be run. Enter chmod + x cs to modify the attributes of the Quick Start file (otherwise it cannot be run)

Now it is done. enter it in the hlds_l directory. /cs & you can start the cs server. Remember to add the & parameter. Otherwise, the cs server process will be automatically disabled when you exit the system.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.