A perfect way to set up a CS server in Linux

Source: Internet
Author: User

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 // fixed lens if you choose 1 after entering the Server you can only watch a battle in a fixed location, otherwise, those not added to the team can watch the video freely) mp_falldamage 1 // The height drops to kill mp_flashlight 1 // whether there is a tactical flashlight mp_footsteps 1 // whether there are footsteps mp_freezetime 4 // The time for starting a fixed purchase item in each bureau defaults 1 // whether the shoulei Youjun hurts mp_friendlyfire 0 // Do You Want To Hurt mp_autoteambalance 2 // automatically adjust the maximum number of people on both sides limit mp_roundtime 4 // The maximum number of times per round rcon_pas Sword *** // server password. * You can set the mp_limitteams for yourself. 2 // if there are more than N users on both sides, the server password is automatically adjusted, N is the number mp_tkpunish 1 // Do You Want To Hurt Youjun penalty mp_mapvoteratio 0.2 // voting ratio mp_logfile 1 // whether the server leaves a record file log on // start to record mp_playerid 0 // for everyone on the status bar the names of all users are displayed; 1 indicates that only one person's own name is visible; 2 indicates that no one's name is visible; 0 indicates that the default value is. 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 the number of injured hostages exceeds three, cl_dynamiccrosshair 0 is automatically kicked out. // if the number is dynamic, 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 do whatever you like, such as pic.

Opico 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. [# Page _ #] [# page _ #] 2) DB (0x245) and DB Queue (0x244 ): it implies that the database cache and disk I/O have reached the bottleneck. The best solution is to increase more memory and optimize the I/O system. Enabling domain-level replication is also helpful.

3) BTree (0x255): it implies how to store views and refresh view indexes. The best solution is to extend the refresh View index to idle time and optimize the I/O subsystem.

7) understand the symptoms of server overload

A typical problem for the server is slow speed or mail transmission failure, which prolongs the user's response time and the time for searching for mail addresses. To check the mail Transmission, you can view the percentage of your disk usage time and the length of the mail sequence. For R5, you can also check the number of mail. box files and the number of local mail Transmission threads. To improve the response time, We should optimize the distribution of I/O-related files in the disk subsystem as much as possible. If the address search is slow, users can use simple directories on their own clients, which reduces the load on servers and networks. You can also check the click rate of Name search Cache Name Lookup Cache. A good click rate should be 85%. If the problem is slow page refreshing rate or non-responding Web server, check the number of HTTP threads and the percentage of disk usage time. Set the number of HTTP threads to (one thread is used for every 10 users ). How can I determine if a server is not fully used? For NT, the index is that the CPU usage is lower than 50%, the disk swap rate is lower than 50%, or there are often more than MB of available memory. However, note that the resource required by the newly added user may not be equal to the average resource of your current user. For example, as the number of users increases, each user's memory needs will be reduced because the fixed memory is allocated to more users.

8) consider the Cluster

Clusters are the main feature of Domino Enterprise Servers. The cluster helps you achieve dynamic load balancing and automatically optimize resource usage in the cluster. In the cluster, you can also transfer email and application failures, including Web applications. You can set R4 and R5 servers on any platform supported by Domino in a group, or cluster partition servers with unpartitioned servers. The Domino cluster is the best way to increase the robustness and reliability of server resources. It is also the safest way to add R5 servers to the R4 cluster. Based on your platform, a low-price system cluster can provide higher reliability than a single huge server at a lower initial cost. In addition, the cluster greatly reduces the number of users who fail to connect to the server. For example, on Windows NT platform, we recommend that you use a cluster if there are more than 750 active users in a system.

9) Partition considerations

Partitioning improves resource usage and reliability of high-end Domino systems, and allows you to distribute servers by department or function while maintaining the benefits of consolidation. Some organizations even use partitions to create "service-level options", that is, place important managers in one partition and others in another partition ). Generally, the number of partitions in the system should not exceed the number of CPUs. The AS/400 system is an exception and is suitable for partitioning. The AS/400 platform also logically isolates partitions, so even if one partition is broken, other partitions can still work normally.

10) Know when to join and when to distribute

Unless you have a convincing reason, you can choose to join on the distribution as a growth strategy. Federation always reduces costs and improves reliability: fewer servers mean less complex server topology, less activity between servers, less network flow, less replication, and less email transmission between servers. When should we select distributed servers instead of combining them? You may have geographic distribution requirements. Local servers process local users and data at a low cost. Or you start to expand relatively small, but the growth is very fast, so add more servers to accommodate new users, or to make better use of the current investment.

You can also set the accounting task to optimize the performance of the Domino System: The method is as follows: to put it bluntly, edit notes. ini)

1. Change the frequency of adding records to the Message Queue. By default, Domino creates records every 15 minutes. During peak usage, if the system performance is reduced or the system virtual memory is insufficient, the frequency of adding records to the Message Queue should be reduced. To modify this setting, add BillingSuppressTime = minutes in the NOTES. ini file (15 by default)

2. Control the running of a Billing task to send records from the message queue to the accounting database or file. By default, a Billing task runs every minute for 10 seconds. When the system is busy, you can change the time and frequency of running the Billing task. To modify the Running frequency of a Billing task, you can add BillingAddinWakeup = seconds (60 by default) to the NOTES. ini file to modify the running duration of the Billing task.

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.