Install the CS server in linux

Source: Internet
Author: User
Tags gz file
Install the CS server in linux-Linux Enterprise Application-Linux server application information. For more information, see. 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 the number of people on both sides exceeds N, the system automatically calls

Integer. N is 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. The installation method is basically the same as above. After it is expanded, it will be overwritten directly. Now, you need to create a quick 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.