Allows you to set up a CS server in Linux.

Source: Internet
Author: User
Tags gz file
Article title: enables the establishment of a CS server in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

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/

Followed by setting the server. cfg File: (The following is already done. copy it directly)

Sv_cheats 0

Hostname "CSchina.net CS 'server" // Server name

Mp_timelimit 45 // map change time

Mp_c4timer 45 // bomb countdown time

Mp_chasecam 0 // whether the lens is fixed
(If you select 1 to enter the server, you can only watch the battle in a fixed location; otherwise, no one is allowed to watch the battle)

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
// Display the name of all persons in the status bar;
1 indicates that only the names of the people are visible; 2 indicates that no one is visible;
0 is the default value.

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 an item can be purchased,
For example, if mp_buytime 1.8 is 108 seconds, you can purchase it.
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 star. 0 is not allowed, and 1 is allowed. The default value is 0.

Mp_logmessages 1 // open log

Download and install the latest server patch, which is 3.1.0.9c at present. the installation method is basically the same as the above. if you expand it and then directly overwrite it, you need to create a shortcut file for starting the server, otherwise, it will be too troublesome to input a large command every time.

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.
Related Article

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.