CentOS8 构建ReHLDS Server
CentOS8下使用ReHLDS等组件构建CS1.6 Linux Server
版本信息
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 15:16:04 Jul 24 2019 (8308)
服务端组件地址
[ReHLDS] https://github.com/dreamstalker/rehlds [ReGameDLL] https://github.com/s1lentq/ReGameDLL_CS [ReAPI] https://github.com/s1lentq/reapi [ReHLDSAddons] https://github.com/SanjaySRocks/ReHLDSAddons [Metamod-R] https://github.com/theAsmodai/metamod-r [AMXMODX] https://www.amxmodx.org/downloads-new.php
文件摆放
[steam@localhost ReHLDS]$ tree . ├── core.so ├── cstrike │ ├── addons │ │ ├── amxmodx │ │ │ ├── modules │ │ │ │ ├── reapi_amxx.dll │ │ │ │ └── reapi_amxx_i386.so │ │ │ └── scripting │ │ │ ├── include │ │ │ │ ├── cssdk_const.inc │ │ │ │ ├── reapi_engine_const.inc │ │ │ │ ├── reapi_engine.inc │ │ │ │ ├── reapi_gamedll_const.inc │ │ │ │ ├── reapi_gamedll.inc │ │ │ │ ├── reapi.inc │ │ │ │ ├── reapi_rechecker.inc │ │ │ │ ├── reapi_reunion.inc │ │ │ │ ├── reapi_version.inc │ │ │ │ └── reapi_vtc.inc │ │ │ └── reapi_test.sma │ │ ├── metamod │ │ │ ├── config.ini │ │ │ ├── metamod_i386.so │ │ │ └── plugins.ini │ │ ├── reauthcheck │ │ │ ├── reauthcheck.cfg │ │ │ └── reauthcheck_mm_i386.so │ │ ├── rechecker │ │ │ ├── rechecker_mm_i386.so │ │ │ └── resources.ini │ │ ├── resemiclip │ │ │ ├── config.ini │ │ │ ├── maps │ │ │ │ ├── _de_dust2.ini │ │ │ │ └── _prefix_de.ini │ │ │ └── resemiclip_mm_i386.so │ │ ├── resrdetector │ │ │ ├── config.cfg │ │ │ └── resrdetector_mm_i386.so │ │ ├── reunion │ │ │ └── reunion_mm_i386.so │ │ ├── VoiceTranscoder │ │ │ ├── VoiceTranscoder.cfg │ │ │ └── VoiceTranscoder.so │ │ └── whblocker │ │ ├── config.ini │ │ └── whblocker_mm_i386.so │ ├── dlls │ │ └── cs.so │ ├── game.cfg │ ├── game_init.cfg │ └── reunion.cfg ├── demoplayer.so ├── engine_i486.so ├── filesystem_stdio.so ├── hlds_linux ├── hltv ├── proxy.so └── valve └── dlls └── director.so 18 directories, 43 files
安装系统组件
sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config && setenforce 0 systemctl stop firewalld.service && systemctl disable firewalld.service dnf install -y epel-release dnf config-manager --set-enabled PowerTools dnf install SDL2.i686 dnf install -y glibc.i686 libstdc++.i686 screen libXtst.i686 ncompress libgcc.x86_64 libgcc.i686 zlib.i686 ncurses-libs.i686
系统配置
vim /etc/sysctl.conf 添加 fs.file-max=100000 vim /etc/pam.d/common-session 添加 session required pam_limits.so vim /etc/security/limits.conf 添加 * soft nofile 100000 * hard nofile 100000
下载服务端
useradd -m steam su - steam mkdir ~/steamcmd && cd ~/steamcmd curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf - ./steamcmd.sh +login anonymous +force_install_dir ./hlds/ +app_set_config 90 mod cstrike +app_update 90 validate +quit mkdir /home/steam/steamcmd/hlds/./cstrike/SAVE touch /home/steam/steamcmd/hlds/./cstrike/listip.cfg touch /home/steam/steamcmd/hlds/./cstrike/banned.cfg
配置服务端
加载metamod
vim /home/steam/steamcmd/hlds/cstrike/liblist.gam 改为 game "Counter-Strike" url_info "www.counter-strike.net" url_dl "" version "1.6" size "184000000" svonly "0" secure "0" type "multiplayer_only" cldll "1" hlversion "1111" nomodels "1" nohimodel "1" mpentity "info_player_start" //gamedll "dlls\mp.dll" //gamedll_linux "dlls/cs.so" gamedll_linux "addons/metamod/metamod_i386.so" //gamedll_osx "dlls/cs.dylib" trainmap "tr_1" edicts "1800"
设置motd
vim /home/steam/steamcmd/hlds/cstrike/motd.txt 改为 <!DOCTYPE html> <html> <head> <title>Cstrike MOTD</title> <style type="text/css"> <!-- BODY {background-image: url(https://www.vos.cn/zb_users/theme/vOS/style/images/pro.jpg); background-position: center; background-repeat: no-repeat; background-attachment: fixed;} --> </style> </head> <body> <noembed><bgsound src="https://www.vos.cn/zb_users/theme/vOS/style/media/punk.mp3"></noembed> </body> </html>
配置各类config
vim /home/steam/steamcmd/hlds/cstrike/server.cfg 改为 //FastDL sv_allow_dlfile 1 sv_downloadurl "http://10.0.0.19/cstrike/" sv_allowdownload 1 sv_allowupload 1 //Rcon rcon_password "rehlds" sv_rcon_banpenalty 0 sv_rcon_maxfailures 99999 sv_rcon_minfailures 10000 sv_rcon_minfailuretime 1440 sv_password "" //Default CVARs mp_autokick 0 mp_autoteambalance 0 mp_autocrosshair 0 mp_buytime 0.25 mp_consistency 0 mp_c4timer 35 mp_chattime 10 mp_decals 300 mp_flashlight 0 mp_footsteps 1 mp_fraglimit 0 mp_fragsleft 0 mp_freezetime 0 mp_friendlyfire 0 mp_forcechasecam 2 mp_forcecamera 2 mp_falldamage 1 mp_fadetoblack 0 mp_friendlyfire 0 mp_friendly_grenade_damage 1 mp_ghostfrenquency 0.1 mp_hostagepenalty 0 mp_kickpercent 1 mp_limitteams 0 mp_lowlag 1 mp_mapvoteratio 0.6 mp_maxrounds 0 mp_mirrordamage 0 mp_mapvoteratio 1.0 mp_playerid 0 mp_roundtime 2.00 mp_startmoney 16000 mp_timelimit 0 mp_tkpunish 0 mp_winlimit 0 sv_accelerate 5 sv_airaccelerate 10 sv_airmove 1 sv_alltalk 1 sv_aim 0 sv_bounce 1 sv_cheats 0 sv_clienttrace 1.0 sv_clipmode 0 sv_enableoldqueries 1 //sv_filetransfermaxsize 10 sv_filterban 1 sv_friction 4 sv_spectalk 1 sv_spetalk 1 sv_spectatormaxspeed 1000 sv_gravity 800 sv_logsecret 0 sv_maxspeed 320 sv_maxvelocity 2000 sv_maxunlag .5 sv_maxvelocity 2000 sv_restart 0 sv_restartround 0 sv_stepsize 18 sv_stopspeed 75 sv_timeout 35 sv_wateraccelerate 10 sv_wateramp 0 sv_waterfriction 1 pausable 0 decalfrequency 5 edgefriction 2 //Info sv_contact "ReHLDS" //Spectator CVARs: mp_allowspectators 1 mp_forcecamera 0 mp_forcechasecam 0 mp_fadetoblack 0 mp_chasecam 0 sv_spectalk 1 sv_spectatormaxspeed 1000 //Voice sv_voiceenable 1 sv_alltalk 0 sv_voicecodec voice_speex sv_voicequality 5 sv_visiblemaxplayers 15 //Miscellaneous sv_filterban 1 sv_contact hlds@vos.cn hostname "CS1.6 ReHLDS" pausable 0 allow_spectators 1 decalfrequency 5 host_framerate 0 edgefriction 2 //Enable/Disable LAN mode sv_lan 0 //Geolocation sv_region 255 //HLTV sv_hltv 0 sv_proxies 0 //Logging log off sv_logbans 0 sv_logecho 0 sv_logfile 0 sv_log_onefile 0 mp_logmessages 0 mp_logdetail 0 mp_logfile 0 //PERFORMANCE hpk_maxsize 0 sv_filetransfercompression 0 host_framerate 0 sv_maxrate 100000 sv_minrate 50000 sv_minupdaterate 100 sv_maxupdaterate 30 sys_ticrate 1100 sv_lan_rate 70000 sv_sendvelocity 1 sv_fullupdate_action 0 //Rechecker logs rch_log 0 // Extras exec rehlds.cfg exec game.cfg exec game_init.cfg exec bots.cfg exec listip.cfg exec banned.cfg echo "Executing Server Configuration File" 【===========================================================================================】 vim /home/steam/steamcmd/hlds/cstrike/bots.cfg 改为 //Bots// bot_quota "2" bot_quota_mode "normal" bot_quota_match bot_join_team "any" bot_difficulty "3" bot_deathmatch "0" bot_auto_vacate "1" bot_prefix "" bot_join_after_player "0" bot_defer_to_human "1" bot_auto_follow "0" bot_walk "0" bot_stop "0" bot_allow_pistols "1" bot_allow_shotguns "0" bot_allow_sub_machine_guns "1" bot_allow_rifles "1" bot_allow_machine_guns "0" bot_allow_grenades "1" bot_allow_snipers "1" bot_allow_shield "0" bot_chatter "off" bot_allow_rogues "1" bot_all_weapons echo "Executing Bots Configuration File" 【============================================================================================】 vim /home/steam/steamcmd/hlds/cstrike/game_init.cfg 改为 // Sets mins/maxs hull bounds for the player. // 0 - disabled (default behaviour, sets engine) // 1 - enabled (sets gamedll) // Default value: "1" mp_hullbounds_sets "1" vim /home/steam/steamcmd/hlds/cstrike/reunion.cfg 改为 # ======================================================== # REUNION CONFIGURATION # ======================================================== # # General rule for modifying this file: # DONT CHANGE ANYTHING IF YOU DONT KNOW WHAT IT MEANS! # # ======================================================== # AUTHID MANAGEMENT # ======================================================== # ClientID types (for cid_* options) # 1: Real (or generated by HW) steam (STEAM_xx:xx:xx) # 2: Real (or generated by HW) valve (VALVE_xx:xx:xx) # 3: STEAM_ by IP # 4: VALVE_ by IP # 5: Deprecated - client will be rejected # 6: reserved for future use # 7: HLTV # 8: STEAM_ID_LAN # 9: STEAM_ID_PENDING # 10: VALVE_ID_LAN # 11: VALVE_ID_PENDING # 12: STEAM_666:88:666 # Use these options to set authid's for clients ### AUTH CONTROL ### # For Legit Steam clients (default is real STEAM_xx:xx:xx [1]) cid_Steam = 1 # Client recognized as pending when they sucessfully authorized, but did not get steam id # REMARK: Actually, it got steamid, but it is useless (STEAM_0:0:0 for example) # default is Deprecated [5] cid_SteamPending = 5 # for HLTV (default is Deprecated [5]) cid_HLTV = 5 # for p.47 clients that do not support unique id generation (default is Deprecated [5]) cid_NoSteam47 = 5 # for p.48 clients that do not support unique id generation (default is Deprecated [5]) cid_NoSteam48 = 5 # For players having revEmu ( >= 9.74) on client-side: # default is real STEAM_xx:xx:xx [1] cid_RevEmu = 1 # For players having RevEmu 2013 on client-side: # default is real STEAM_xx:xx:xx [1] cid_RevEmu2013 = 1 # For players having SteamClient 2009 / revEmu > 9.82 on client-side: # default is real STEAM_xx:xx:xx [1] cid_SC2009 = 1 # For players having old revEmu on client-side: # default is real STEAM_xx:xx:xx [1] cid_OldRevEmu = 1 # For players having hCupa's SteamEmu on client-side: # default is real STEAM_xx:xx:xx [1] cid_SteamEmu = 1 # For players having AVSMP (Cracked Steam) on client-side: # default is real STEAM_xx:xx:xx [1] cid_AVSMP = 1 # For SETTI ServerScanner # default is STEAM_xx:xx:xx generated by IP [3] cid_Setti = 3 # For SXEI Clients # default is real STEAM_xx:xx:xx [1] cid_SXEI = 1 # For players having SmartSteamEmu > 1.2.4 on client-side: # default is real STEAM_xx:xx:xx [1] cid_SSE3 = 1 ### AUTH SETTINGS ### # Authorization protocols version. All steamdid's of non-steams players will be changed in common with this value. # 1: DProto (deprecated) # 2: Reunion 2015-2018 # 3: Reunion new (recommended) AuthVersion = 3 # SteamIdHashSalt (string) # Salt string for SteamIDs hashing. Irreversibly changes SteamIDs. Prevents SteamID stealing. # Should be more than 16 chars length. If string is empty, hashing is not applied (AuthVersion < 3) or Reunion init will be failed (AuthVersion >= 3). SteamIdHashSalt = KvQXw38P4qY#JM%x # SC2009_RevCompatMode (0 / 1) # Enable fix to make steamids generated for SC2009 compatible with revEmu. Can't be disabled with AuthVersion >= 3. # Default: 1 SC2009_RevCompatMode = 1 # EnableSXEIdGeneration (0 / 1) # Turns on steamid generation based on info sent by sXeI client # Enable this ONLY if you have sXeI server installed! # Default: 0 EnableSXEIdGeneration = 0 # EnableGenPrefix2 (0 / 1) # Enable second prefix (STEAM_*:0/1:****) for generated authids. Reduces chance of authid collisions. Works only with configured SteamIdHashSalt. Can't be disabled with AuthVersion >= 3. # Default: 0 EnableGenPrefix2 = 0 # HLTVExcept_IP (ip addr) # HLTV from this IP will be able to join the server even if cid_HLTV is set to 5 (deprecated) HLTVExcept_IP = 127.0.0.1 ### AUTHID PREFIXES ### # This config section will be ignored when AuthVersion > 2. # IPGen_Prefix1 (int) # STEAM_a:b:c # first prefix (a) for authids generated by IP IPGen_Prefix1 = 0 # IPGen_Prefix2 (int) # STEAM_a:b:c # second prefix (b) for authids generated by IP IPGen_Prefix2 = 4 # Native_Prefix1 (int) # STEAM_a:b:c # first prefix (a) for authids generated by native auth method (Steam) Native_Prefix1 = 0; # RevEmu_Prefix1 (int) # STEAM_a:b:c # first prefix (a) for authids generated by RevEmu RevEmu_Prefix1 = 1; # RevEmu2013_Prefix1 (int) # STEAM_a:b:c # first prefix (a) for authids generated by RevEmu2013 RevEmu2013_Prefix1 = 1; # SC2009_Prefix1 (int) # STEAM_a:b:c # first prefix (a) for authids generated by Steamclient 2009 SC2009_Prefix1 = 1; # OldRevEmu_Prefix1 (int) # STEAM_a:b:c # first prefix (a) for authids generated by old RevEmu OldRevEmu_Prefix1 = 2; # SteamEmu_Prefix1 (int) # STEAM_a:b:c # first prefix (a) for authids generated by SteamEmu SteamEmu_Prefix1 = 3; # SteamEmu_Prefix1 (int) # STEAM_a:b:c # first prefix (a) for authids assigned for AVSMP Clients (Cracked steam) AVSMP_Prefix1 = 4; # Setti_Prefix1 (int) # STEAM_a:b:c # first prefix (a) for authids assigned for Setti server scanner Setti_Prefix1 = 5; # SXEI_Prefix1 (int) # STEAM_a:b:c # first prefix (a) for authids assigned for sXeI clients SXEI_Prefix1 = 6; # SSE3_Prefix1 (int) # STEAM_a:b:c # first prefix (a) for authids assigned for SSE3 SSE3_Prefix1 = 7; # Note that banid will use steamid WITHOUT any prefixes! # ======================================================== # SERVER QUERIES MANAGEMENT # ======================================================== # ServerInfoAnswerType (0/1/2) # Sets server answer type for query requests # 0 = New style (Steam) (recommended) # 1 = Old Style (GoldSource Engine) # 2 = Hybrid mode - Server is visible anywhere, but there are 3 packets generated for every serverinfo request # Default: 0 ServerInfoAnswerType = 2 # FixBuggedQuery (0 / 1) # Enable fix for clients with bugged serverbrowser. Prevents hanging on connect. # Default: 1 FixBuggedQuery = 1 # EnableQueryLimiter (0 / 1) # Enable ratelimit for server queries (TSource, players, etc). You can use 0 if external protection solutions used. # Default: 1 EnableQueryLimiter = 1 # QueryRateLimit (128/2048) # Global rate limit for server queries in packets/sec. # Default: 256 QueryRateLimit = 256 # QueryFloodBanLevel (320 - 2048). # Queries/sec level for ip ban. Maximum measured legit level is 80/sec. # Default: 400 QueryFloodBanLevel = 400 # QueryFloodBanTime (0 - 60). # Ban time in minutes for server query flooding. Use 0 to disable bans (block only). # Default: 10 QueryFloodBanTime = 10 [QueryLimiterExceptIP] #127.0.0.1 # LogAttacks (0 / 1) # Log attacks to reunion_attacks.log # Default: 1 LogAttacks = 0 # AllowSplitPackets (0 / 1) # Allow splitting of outgoing packets if they size are greater than 1400. Used in original steamclient, but does not supported by some monitorings. # Default: 0 AllowSplitPackets = 0 # IPClientsLimit (0 - 32) # Maximum number of clients from single ip. Useful for computer clubs. # Default: 5 IPClientsLimit = 5 # ======================================================== # OTHER STUFF # ======================================================== # LoggingMode: # 0 = None # 1 = Console # 2 = Log Files # 3 = Both LoggingMode = 0 【============================================================================================】 vim /home/steam/steamcmd/hlds/cstrike/rehlds.cfg 改为 //ReHLDS cvar// // File for permanent ip bans. Default: listip.cfg listipcfgfile listip.cfg // File for the system error log. Default: sys_error.log syserror_logfile sys_error.log // Automatically precache sounds attached to models. Deault: 0 sv_auto_precache_sounds_in_models 1 // Upload custom sprays after entering the game instead of when connecting. It increases upload speed. Default: 0 sv_delayed_spray_upload 1 // Echo in the console when trying execute an unknown command. Default: 0 sv_echo_unknown_cmd 0 // Print rcon debug in the console. Default: 1 sv_rcon_condebug 0 // In a 3-rd party plugins used to force colliding of SOLID_SLIDEBOX entities. Default: 0 sv_force_ent_intersection 0 // Force a client's cl_dlmax cvar to 1024. It avoids an excessive packets fragmentation. Default: 0 sv_rehlds_force_dlmax 1 // Use center of hull instead of corner. Default: 0 sv_rehlds_hull_centering 1 // Max average level of 'move' cmds for ban. Default: 400 sv_rehlds_movecmdrate_max_avg 10000 // Time in minutes for which the player will be banned (0 - Permanent, use a negative number for a kick). Default: 5 sv_rehlds_movecmdrate_avg_punish -1 // Max burst level of 'move' cmds for ban. Default: 2500 sv_rehlds_movecmdrate_max_burst 25000 // Time in minutes for which the player will be banned (0 - Permanent, use a negative number for a kick). Default: 5 sv_rehlds_movecmdrate_burst_punish 5 // Send mapcycle.txt in serverinfo message (HLDS behavior, but it is unused on the client). Default: 0 sv_rehlds_send_mapcycle 0 // Max average level of 'string' cmds for ban. Default: 80 sv_rehlds_stringcmdrate_max_avg 1000 // Time in minutes for which the player will be banned (0 - Permanent, use a negative number for a kick). Default: 5 sv_rehlds_stringcmdrate_avg_punish -1 // Max burst level of 'string' cmds for ban. Default: 400 sv_rehlds_stringcmdrate_max_burst 10000 // Time in minutes for which the player will be banned (0 - Permanent, use a negative number for a kick). Default: 5 sv_rehlds_stringcmdrate_burst_punish -1 // Userinfo fields only with these keys will be transmitted to clients via network. If not set then all fields will be transmitted (except prefixed with underscore). Each key must be prefixed by backslash, for example "\name\model\*sid\*hltv\bottomcolor\topcolor". See [wiki](https://github.com/dreamstalker/rehlds/wiki/Userinfo-keys) to collect sufficient set of keys for your server. Default: "" sv_rehlds_userinfo_transmitted_fields "\name\model\*sid\*hltv\bottomcolor\topcolor" // Fixes bug with gait animation speed increase when player has some attached entities (aiments). Can cause animation lags when cl_updaterate is low. Default: 0 sv_rehlds_attachedentities_playeranimationspeed_fix 1 // Limit number of connections from the single ip address. Default: 5 sv_rehlds_maxclients_from_single_ip 5 // Use custom entity file for a map. Path to an entity file will be "maps/[map name].ent". 0 - use original entities. 1 - use .ent files from maps directory. 2 - use .ent files from maps directory and create new .ent file if not exist. sv_use_entity_file 0 // When enabled server will populate an additional random seed independent of the client. Default: 0 sv_usercmd_custom_random_seed 0 echo Executing ReHLDS Configuration File 【===========================================================================================】 vim /home/steam/steamcmd/hlds/cstrike/game.cfg 改为 //ReGameDLL// // The style of gameplay where there aren't any teams (FFA mode) // 0 - disabled (default behaviour) // 1 - enabled // // Default value: "0" mp_freeforall 0 // Auto balancing of teams // 0 - disabled // 1 - on after next round (default behaviour) // 2 - on next round // // Default value: "1" mp_autoteambalance 0 // Designate the desired amount of buy time for each round. (in minutes) // -1 - means no time limit // 0 - disable buy // // Default value: "1.5" mp_buytime 1.5 // The maximum allowable amount of money in the game // NOTE: Allowable money limit is 999999 // // Default value: "16000" mp_maxmoney 999999 // Disable round end by game scenario // 0 - disabled (default behaviour) // 1 - enabled (never end round) // // Flags for fine grained control (choose as many as needed) // a - block round time round end check, contains "h", "i", "j", "k" flags // b - block needed players round end check // c - block VIP assassination/success round end check // d - block prison escape round end check // e - block bomb round end check // f - block team extermination round end check // g - block hostage rescue round end check // h - block VIP assassination/success round time end check // i - block prison escape round time end check // j - block bomb round time end check // k - block hostage rescue round time end check // // Example setting: "ae" - blocks round time and bomb round end checks // Default value: "0" mp_round_infinite 0 // The round by expired time will be over, if on a map it does not have the scenario of the game. // 0 - disabled (default behaviour) // 1 - end of the round with a draw // 2 - round end with Terrorists win // 3 - round end with Counter-Terrorists win // // Default value: "0" mp_roundover 0 // Number of seconds to delay before restarting a round after a win. // // Default value: "5" mp_round_restart_delay 5 // Disable grenade damage through walls // 0 - disabled // 1 - enabled // // Default value: "0" mp_hegrenade_penetration 1 // Drop a grenade after player death // 0 - disabled // 1 - drop first available grenade // 2 - drop all grenades // // Default value: "0" mp_nadedrops 1 // Player cannot respawn until next round // if more than N seconds has elapsed since the beginning round // -1 - means no time limit // // Default value: "20" mp_roundrespawn_time 20 // Automatically reload each weapon on player spawn // 0 - disabled (default behaviour) // 1 - enabled // // Default value: "0" mp_auto_reload_weapons 1 // Refill amount of backpack ammo up to the max // 0 - disabled (default behaviour) // 1 - refill backpack ammo on player spawn // 2 - refill backpack ammo on player spawn and on the purchase of the item // 3 - refill backpack ammo on each weapon reload (NOTE: Useful for mods like DeathMatch, GunGame, ZombieMod etc.) // // Default value: "0" mp_refill_bpammo_weapons 1 // Sets the mode infinite ammo for weapons // 0 - disabled (default behaviour) // 1 - weapon clip infinite // 2 - weapon bpammo infinite (This means for reloading) // // Default value: "0" mp_infinite_ammo 1 // Enable infinite grenades // 0 - disabled (default behaviour) // 1 - grenades infinite // // Default value: "0" mp_infinite_grenades 1 // Automatically joins the team // 0 - disabled // 1 - enabled (Use in conjunction with the cvar humans_join_team any/SPEC/CT/T) // // Default value: "0" mp_auto_join_team 0 // Maximum number of allowed teamkills before autokick. // Used when enabled mp_autokick. // 0 - disabled // // Default value: "3" mp_max_teamkills 3 // If set to something other than 0, // when anybody’s scored reaches mp_fraglimit the server changes map. // 0 - means no limit // // Default value: "0" mp_fraglimit 0 // Period between map rotations. // 0 - means no limit // // Default value: "0" mp_timelimit 0 // Players will automatically respawn when killed. // 0 - disabled // >0.00001 - time delay to respawn // // Default value: "0" mp_forcerespawn 0 // The hostages can take damage. // 0 - disabled // 1 - from any team (default behaviour) // 2 - only from CT // 3 - only from T // // Default value: "1" mp_hostage_hurtable 1 // Show radio icon. // 0 - disabled // 1 - enabled (default behavior) // // Default value: "1" mp_show_radioicon 1 // Show scenario icon in HUD such as count of alive hostages or ticking bomb. // 0 - disabled (default behavior) // 1 - enabled // // Default value: "0" mp_show_scenarioicon 1 // Play "Bomb has been defused" sound instead of "Counter-Terrorists win" when bomb was defused // 0 - disabled (default behavior) // 1 - enabled // // Default value: "1" mp_old_bomb_defused_sound 1 // Sets the mode for the zBot // 0 - disabled // 1 - enable mode Deathmatch and not allow to do the scenario // // Default value: "0" bot_deathmatch 0 // Determines the type of quota. // normal - default behaviour // fill - the server will adjust bots to keep N players in the game, where N is bot_quota // match - the server will maintain a 1:N ratio of humans to bots, where N is bot_quota // // Default value: "normal" bot_quota_mode "normal" // Prevents bots from joining the server for this many seconds after a map change. // // Default value: "0" bot_join_delay 0 // Prevents bots on your server from moving. // 0 - disabled (default behavior) // 1 - enabled // // Default value: "0" bot_freeze 0 // Debug cvar shows triggers. // 0 - disabled (default behaviour) // 1 - enabled // // Default value: "0" showtriggers 0 // When players can hear each other. // Further explanation: https://github.com/s1lentq/ReGameDLL_CS/wiki/sv_alltalk // 0 - dead don't hear alive // 1 - no restrictions // 2 - teammates hear each other // 3 - same as 2, but spectators hear everybody // 4 - alive hear alive, dead hear dead and alive. // 5 - alive hear alive teammates, dead hear dead and alive. // // Default value: "0" sv_alltalk 3 // Time to remove item that have been dropped from the players. (in seconds) // // Default value: "300" mp_item_staytime 300 // Legacy func_bomb_target touch. New one is more strict. // 0 - New behavior // 1 - Legacy behavior // // Default value: "1" mp_legacy_bombtarget_touch 1 // Specifies the players defense time after respawn. (in seconds). // 0 - disabled // >0.00001 - time delay to remove protection // // Default value: "0" mp_respawn_immunitytime "0" // Enable effects on player spawn protection // 0 - disabled // 1 - enabled (Use in conjunction with the cvar mp_respawn_immunitytime) // // Default value: "1" mp_respawn_immunity_effects 1 // Force unset spawn protection if the player doing any action. // 0 - disabled // 1 - when moving and attacking // 2 - only when attacking // // Default value: "1" mp_respawn_immunity_force_unset 1 // Kill the player in filled spawn before spawning some one else (Prevents players stucking in each other). // Only disable this if you have semiclip or other plugins that prevents stucking // 0 - disabled // 1 - enabled // // Default value: "1" mp_kill_filled_spawn 1 // Allow use of point_servercommand entities in map. // NOTE: Potentially dangerous for untrusted maps. // 0 - disallow // 1 - allow // // Default value: "0" mp_allow_point_servercommand 0 // Show 'HP' field into a scoreboard // -1 - disabled // 0 - don't send any update for 'HP' field to any clients // 1 - show only Terrorist 'HP' field to all clients // 2 - show only CT 'HP' field to all clients // 3 - show 'HP' field to teammates // 4 - show 'HP' field to all clients // 5 - show 'HP' field to teammates and spectators // // Default value: "3" mp_scoreboard_showhealth 5 // Show 'Money' field into a scoreboard // -1 - disabled // 0 - don't send any update for 'Money' field to any clients // 1 - show only Terrorist 'Money' field to all clients // 2 - show only CT 'Money' field to all clients // 3 - show 'Money' field to teammates // 4 - show 'Money' field to all clients // 5 - show 'Money' field to teammates and spectators // // Default value: "3" mp_scoreboard_showmoney 5 // Show 'D. Kit' field into a scoreboard for teammates // NOTE: If you don't want to show defuse kit field for dead enemies // then disable this CVar or configure mp_forcecamera // 0 - disabled // 1 - enabled // // Default value: "1" mp_scoreboard_showdefkit 1 // How much to reduce damage done to teammates when shot. // Range is from 0 - 1 (with 1 being damage equal to what is done to an enemy) // // Default value: "0.35" ff_damage_reduction_bullets "0.35" // How much to reduce damage done to teammates by a thrown grenade. // Range is from 0 - 1 (with 1 being damage equal to what is done to an enemy) // // Default value: "0.25" ff_damage_reduction_grenade "0.25" // How much to damage a player does to himself with his own grenade // Range is from 0 - 1 (with 1 being damage equal to what is done to an enemy) // // Default value: "1.0" ff_damage_reduction_grenade_self "1.0" // How much to reduce damage done to teammates by things other than bullets and grenades. // Range is from 0 - 1 (with 1 being damage equal to what is done to an enemy) // // Default value: "0.35" ff_damage_reduction_other "0.35" // Player that have never moved sience they last move // will drop the bomb after this amount of time. (in seconds). // 0 - disabled // >5.0 - delay to drop // // Default value: "0" mp_afk_bomb_drop_time "0" // Delay between player Radio messages. (in seconds). // 0 - disable delay // // Default value: "1.5" mp_radio_timeout "1.5" // Maximum Radio messages count for player per round. // 0 - disable radio messages // // Default value: "60" mp_radio_maxinround 60 // When set, players can buy anywhere, not only in buyzones. // 0 - disabled // 1 - both teams // 2 - only Terrorists team // 3 - only CT team // // Default value: "0" mp_buy_anywhere 0 // Don't unduck if ducking isn't finished yet. // NOTE: This also prevents double duck. // 0 - disabled (default behaviour) // 1 - enabled // // Default value: "0" mp_unduck_method 0 // Whether this map should spawn a C4 bomb for a player or not. // 0 - disabled // 1 - enabled (default behaviour) // // Default value: "1" mp_give_player_c4 1 // When set, map weapons (located on the floor) will be shown. // NOTE: Effect will work after round restart. // 0 - hide all map weapons // 1 - enabled (default behaviour) // // Default value: "1" mp_weapons_allow_map_placed 1 // Observer's screen will fade to black on kill event or permanent. // 0 - No fade // 1 - Fade to black and won't be able to watch anybody // 2 - fade to black only on kill moment. // // Default value: "0" mp_fadetoblack 0 // Damage from falling. // 0 - disabled // 1 - enabled (default behaviour) // // Default value: "1" mp_falldamage 1 // The default grenades that the Ts will spawn with. // Usage: "hegrenade flash sgren" // // Default value: "" mp_t_default_grenades "" // Whether Terrorist player spawn with knife. // 0 - disabled // 1 - enabled (default behaviour) // // Default value: "1" mp_t_give_player_knife 1 // The default primary (rifle) weapon that the Ts will spawn with. // Usage: "awp m4a1 mp5navy" // // Default value: "" mp_t_default_weapons_primary "" // The default secondary (pistol) weapon that the Ts will spawn with. // // Default value: "glock18" mp_t_default_weapons_secondary "glock18" // The default grenades that the CTs will spawn with. // Usage: "hegrenade flash sgren" // // Default value: "" mp_ct_default_grenades "" // Whether Counter-Terrorist player spawn with knife. // 0 - disabled // 1 - enabled (default behaviour) // // Default value: "1" mp_ct_give_player_knife 1 // The default primary (rifle) weapon that the CTs will spawn with. // Usage: "awp m4a1 mp5navy" // // Default value: "" mp_ct_default_weapons_primary "" // The default secondary (pistol) weapon that the CTs will spawn with. // // Default value: "usp" mp_ct_default_weapons_secondary "usp" // Give the player free armor on player spawn // 0 - No armor (default behavior) // 1 - Give Kevlar // 2 - Give Kevlar and Helmet // // Default value: "0" mp_free_armor 0 echo Executing ReGameDLL Configuration File
其他设置
exit chown -R steam:steam /home/steam/steamcmd/hlds/ chmod -R 700 /home/steam/steamcmd/hlds/ #修复/home/steam/.steam/sdk32/steamclient.so: cannot open shared object file: No such file or directory错误 mkdir ~/.steam/sdk32/ cp /home/steam/steamcmd/linux32/steamclient.so ~/.steam/sdk32/steamclient.so
启动
su - steam cd /home/steam/steamcmd/hlds tmux new-session -s HLDS ./hlds_run -game cstrike +exec server.cfg -pingboost 3 +port 27015 -nomaster -insecure +maxplayers 15 +map de_dust2 -noipx -tos +ip 0.0.0.0 -bots -host-improv
如果要返回至原回话,按CTRL+b,然后再按d
tmux list-sessions可以查看tmux回话列表,如果要进入HLDS运行的窗口tmux attach-session
输出信息
Auto-restarting the server on crash Console initialized. Using breakpad crash handler Setting breakpad minidump AppID = 10 Forcing breakpad minidump interfaces to load Looking up breakpad interfaces from steamclient Calling BreakpadMiniDumpSystemInit Protocol version 48 Exe version 1.1.2.7/Stdio (cstrike) Exe build: 18:58:01 Sep 21 2019 (1988) STEAM Auth Server Enabling LOWDELAY TOS option Server IP address 0.0.0.0:27015 Metamod-r version 1.3.0.128 Copyright (c) 2016-2018 ReHLDS Team (rebuild of original Metamod by Will Day and Jussi Kivilinna) Metamod-r comes with ABSOLUTELY NO WARRANTY; for details type `meta gpl'. This is free software, and you are welcome to redistribute it under certain conditions; type `meta gpl' for details. Metamod-r v1.3.0.128, API (5:13) Metamod-r build: 17:47:48 Aug 24 2018 Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70 AMX Mod X version 1.8.3-Re Copyright (c) 2004-2016 AMX Mod X Development Team (modification ReHLDS Team) AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'. This is free software and you are welcome to redistribute it under certain conditions; type 'amxx gpl' for details. [ReAPI]: ReGameDLL API minor version mismatch; expected at least 13, real 9 [ReAPI]: Please update the ReGameDLL up to a minor version API >= 13 [ReAuthCheck] Version: 0.1.6 Linux 'Counter-Strike 1.6' [ReAuthCheck] Success: Configuration executed. [ReAuthCheck] Success: Build ReHLDS version defined Linux '1988' ReGameDLL version: 5.9.0.387-dev Executing ReGameDLL Configuration File Navigation map loaded. Executing AMX Mod X Configuration File [S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed. CAppInfoCacheReadFromDiskThread took 1 milliseconds to initialize CApplicationManagerPopulateThread took 2 milliseconds to initialize (will have waited on CAppInfoCacheReadFromDiskThread) Looking up breakpad interfaces from steamclient Calling BreakpadMiniDumpSystemInit Master server communication disabled. Executing ReHLDS Configuration File Executing ReGameDLL Configuration File Executing Bots Configuration File Executing Server Configuration File Connection to Steam servers successful. VAC secure mode disabled.
服务器不需要安装mmtimer1.6FPS为1000+,几个addons均运行正常
Nginx FastDL配置
server { listen 80 default_server; listen [::]:80 default_server; server_name _; root /home/steam/steamcmd/hlds/; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; location ^~ / { if ($request_uri ~ .*\.(cfg|log|inf|lst|ico|vdf|dll|so|htm|ini|db|scr|dylib)?$) { return 403; } }
本站所有文章均可随意转载,转载时请保留原文链接及作者。