Академический Документы
Профессиональный Документы
Культура Документы
Call of Duty 4
This
guide is provided for informational purposes only
While I believe this guide to be 90% complete, it still needs some fine tuning.
I believe the mp-server.cfg can be improved from it's current state and will update
it again when I feel my server config is ideal
Contents
General Info
Install Dependencies
Launch Server
General Info
I created this guide
using Centos 6 64 bit (Fedora,Centos,RedHat Should
all work, other distos with minor changes in
dependency install should
also work)
Unless you really
understand SELinux is should be disabled to prevent
issues with the game server and Punkbuster
In this guide
replace<newuser>with the
user name you want to run cod4 as
Just type in 'su -' and your root password to elevate to root for
installs etc.
The above commands
create a new user with a home directory of /home/<newuser>.
Running the game as a non privileged user from the users
home directory will help keep your server secure.
Install Dependencies
yum -y install glibc.i686 libgcc.i686 libstdc++.i686
zlib.i686 screen.x86_64
Setup Server
Configuration
http://cod4-linux-server.webs.com/[7/24/2015 12:34:01 PM]
Create a server
configuration file
vim /home/<newuser>/cod4/main/mp-server.cfg
Copy and paste this
data into the file, modify it to your server needs
set scr_hardcore
1
set sv_hostname
"<servername>"
set _Admin "<adminname>"
set g_logsync
"2" // 0=no log, 1=buffered, 2=continuous, 3=append
set logfile
"1" // 0 = NO log, 1 = log file enabled
set g_log
"games_mp.log" // Name of log file, default is games_mp.log
set sv_log_damage
"1"
// Network options
set net_ip
"<serverip>" //our servers IP address
set net_port
"28960" // Set your port number
sv_connectTimeout 90 // [0-n] (seconds)
sv_timeout 240 // [0-n] (seconds)
// Password Settings
set rcon_password
"<rconpass>" // RCON must supply pw to use
set sv_privatePassword
"" // Private slots, non-public slots
// Ping
set sv_minPing
"0" // MIN player ping on CONNECT, any lower and player isnt allowed to connect
set sv_maxping
"300" // MAX player ping on CONNECT, any higher and player isnt allowed to connect
// Rate
set sv_maxRate
"25000"
// AntiFlooding Settings
set sv_floodProtect
"1"
set sv_reconnectlimit
"3"
//domination
//----------scr_dom_scorelimit 2500 //[0-n]
scr_dom_timelimit 15 //[0-n] (minutes)
//team deathmatch
//----------------scr_war_scorelimit 2500 // [0-n]
scr_war_timelimit 15 //[0-n] (minutes)
set scr_war_waverespawndelay
0
set scr_war_playerrespawndelay
1
//sabotage
//--------scr_sab_scorelimit 8 // [1-n] (points)
scr_sab_timelimit 5 //[0-n] (minutes)
scr_sab_roundswitch 1 // [0-n] (after how many rounds)
scr_sab_bombtimer 40 // [0-n] (seconds)
scr_sab_planttime 10 // [0-n] (seconds)
scr_sab_defusetime 10 //[0-n] (seconds)
scr_sab_hotpotato 1 // [0-1] (shared bomb timer)
//headquarters
//------------scr_koth_scorelimit 2500
scr_koth_timelimit 5
koth_autodestroytime 90 //[0-n] (seconds)
koth_kothmode 1 //[0-1] (classic mode, non-classic)
koth_spawntime 10 //[0-n] (seconds, hq spawn time)
// Team Settings
set scr_teambalance
"1"
set scr_team_respawntime
"0"
set scr_team_fftype 1//[0-3] (Disabled, Enabled, Reflect,
Shared)
set g_deadChat
set g_allowvote
1
Firewalls and
Ports
Allow the following
ports in iptables
20800 UDP
20810 UDP
28960 UDP (or whatever port your server is on if
you changed from the default 28960)
To allow these ports
in add the following lines to your /etc/sysconfig/iptables file
You must add them
before the 'reject all' rule
Launch Server
./cod4_lnxded +set dedicated 2 +set sv_punkbuster
1 +exec mp-server.cfg
This should bring
your server up
If you can't see or
connect to your server there is an issue with your iptables
or forwarding the ports into your server. If correctly configured
your server
will show and you can connect to it.