This should be helpfull to serveradmins to get a server up on linux.
If you're running a x64 server you first need 32bit compatability libs, on debian stable that would be the package "ia32-libs" on ubuntu / debian-testing "libc6-i386" should be enough.
We will install the server in a public directory in oder to use different users for different servers.
Since we need all files owned by root I run as root from now on
Start of with creating a a directory "cod4-linux-server" in /usr/local/games
Now you need to upload all the cod4 media files, you need the main, miles and zone folder from your installation.
Copy them into the newly created folder on the server, this will take some time 6.3GB don't upload in a second.
Now we need the actual linux binaries
curl -OL http://treefort.icculus.org/cod/cod4-linux-server-06282008.tar.bz2
curl -OL http://treefort.icculus.org/cod/cod4-lnxsrv-query-limit-test.tar.bz2
The first is the linux stuff, whilst the 2nd is a fix for the getuserinfo exploit.
Time to extract the archives:
tar -xf PATHTOcod4-linux-server-06282008.tar.bz2
tar -xf PATHTOcod4-lnxsrv-query-limit-test.tar.bz2
Do not extract the fix first!
We also need a handcrafted startscript because otherwise the cod4 binary will not find the libraries that came with it
Open a new file "cod4-ded" (inside the cod4-linux-server directory) in your favourite text editor and write
also make it executable
chmod +x cod4-ded
now we just need to make this script findable by the average user
ln -s /usr/local/games/cod4-linux-server/cod4-ded
At this point you could try to start a regular cod 4 server as a user NOT as root. If it works we're halfway there.2. Punkbuster
Get the latest PbSetup for linux from evenbalance http://websec.evenbalance.com/downloade ... php?file=5
(you need todo this locally and upload it because it has a captcha)
Upload it to the server and run
chmod +x pbsetup.run
./pbsetup.run -ag cod4 -ap /usr/local/games/cod4-linux-server
If the last step fails try it again, and again. If it still doesn't work you'll have to make a local install under linux, run it there and then upload the "pb" folder to the server.3. MWTC
Load the MWTC zip to the server and unpack it like this:
You should be able to start a mwtc server like this now (again NOT as root):
cod4-ded +set fs_game mods/truecombat +map mp_tc_hangar
When you've started the server once you'll have a folder .callofduty4 in your home directory, put all your server configs into mods/truecombat there to seperate them per user.
And here is a sample server config:
sets _Admin YOURNAME
sets _Location SERVERCOUNTRY
set sv_hostname SERVERNAME
set sv_mapRotation "map mp_tc_backlot map mp_tc_hangar"
// TC BASE STUFF taken from truecombat.cfg
// warmup/ready countdown
set scr_game_playerwaittime "3"
set scr_game_playerstarttime "3"
set scr_game_matchstarttime "3"
set scr_player_forcerespawn "0"
set scr_player_maxhealth "100"
set scr_team_fftype "3" // [0-3] (Disabled, Enabled, Reflect, Shared)
set ui_hud_obituaries "0"
set ui_hud_showobjicons "1"
// player limits
set sv_maxclients 14
set sv_privateClients 0
set sv_minPing 0
set sv_maxPing 250
set scr_teambalance 1
set sv_voice 0
set g_allowvote 0
Also a little thing about ctf, starting a server with +set g_gametype ctf doesn't work, you have to put "gametype ctf" at the beginning of the maprotation like this:
set sv_mapRotation "gametype ctf map mp_tc_backlot map mp_tc_hangar"
And start the server like this:
cod4-ded +set fs_game mods/truecombat +map_rotate