farfromfearless

Installing a Call of Duty 4 server on FreeBSD

One of the reasons why I write this post is that I always forget how I managed to install the COD4 server on FreeBSD. Another reason is that people keep asking on how I did it, so I will try to provide a complete manual. This post will most likely receive a few updates in the future. Please post your requests for help by commenting on this post.

Requirements

  • FreeBSD (jail) installation
  • Port/package linux_base-fc4 installed
  • Enabled linux emulation
  • COD4 DVD

Creating your server release

  • First of all you need a MS windows installation or emulation to install/unpack your COD4 DVD. For example you could install/unpack to ‘C:\Games\cod4\’. The reason that you need to do this on windows is because Activision/Infinity Ward doesn’t provide a serverpackage or unix installation of cod4.
  • Now patch your installation to the latest version (current version is: 1.7568)
  • Create a directory ‘C:\Games\cod4srv\’.
  • Copy the all the files and directories from cod4 to cod4srv.
  • Go to ‘C:\Games\cod4srv\’ and delete the following files as this will save some space on your server:
    • Docs\
    • main\videos\* (all but keep zakhaev_escape.bik)
    • players\
  • Get the cod4 linux binaries from the following URL: http://treefort.icculus.org/cod/ (most recent: cod4-linux-server-06282008.tar.bz2)
  • Unpack cod4-linux-server-06282008.tar.bz2 to ‘C:\Games\cod4srv\’.
  • Now pack ‘C:\Games\cod4srv\’
  • Transfer the pack to your server
  • Unpack (to the directory ‘/home/cod4/cod4srv’ for example)
  • Keep your original (C:\Games\cod4\) directory for future patching

Running your COD4 server

  • Create a server.cfg file (an example server.cfg file can be found here)
  • Put the server.cfg file in the ‘/home/cod4/cod4srv/main’ directory
  • Now we can run the server:
cod4srv# cd /home/cod4/cod4srv
cod4srv# ./cod4_lnxded +set dedicated 2 +set net_port 28960 sv_maxclients 20 +exec server.cfg +map_rotate &

This command will start a dedicated server on port 28960 with 20 slots, map rotation enabled and will load the options from the server.cfg file. The server will run in the background. Optionally you can run the server in a screen session and detach from it.

Patching your server release

/* Coming soon */

Installing anti-cheat mechanisms

PunkBuster

First shutdown or kill your running cod4 server. Now run the following commands:

cod4srv# cd /home/cod4/cod4srv
cod4srv# ./pbsetup.run -e
cod4srv# ./pbsetup.run --add-game=cod4 --add-game-path=/home/cod4/cod4srv/
cod4srv# ./pbsetup.run -u

While running the PunkBuster setup it will ask you to agree to a license and possibly ask you a few other questions. The PB setup will download and install the most recent files. Now you can run your server again!

Dmw Pro

/* Coming soon */

FAQ

Why don’t you play cod4? Oh, I forgot to tell… I don’t really play cod4, I just installed a cod4 server for a couple of friends. And yes, I have an official license key. :-)

No comments as yet.

Anonymous - Gravatar

No comments have yet been made to this posting.

Commentors on this Post-

Leave a Comment-

Comment Guidelines: Basic XHTML is allowed (a href, strong, em, code). All line breaks and paragraphs are automatically generated. Off-topic or inappropriate comments will be edited or deleted. Email addresses will never be published. Keep it PG-13 people!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

All fields marked with "*" are required.