First, I put a new user for the Callofduty4 server and wget INSTALLING (if it is not already installed)
useradd -m callofduty4
yum install -y wget
aptitude install wget
Download the Server Files
Extract the Server Files
tar xvfj cod4_1.7_full_linux.tar.bz2
Since the packed server files are no longer needed, it will be deleted.
rm -f cod4_1.7_full_linux.tar.bz2
Now I change the owner of the server files, because I do not want to run as root the Game Server.
chown -R callofduty4:callofduty4 /home/callofduty4
Then switch users and go callofduty4 into the home directory of user:
su callofduty4 cd /home/callofduty4
Setting up Punkbuster
Against the cheaters we still install Punkbuster:
You will be asked whether to accept the EULA, I accept this, so I confirm with y. Next we add Call of Duty 4 Punkbuster added to:
./pbsetup.run --add-game=cod4 --add-game-path=/home/callofduty4 pbsetup v2.0 Do you agree to the PunkBuster EULA? (Y/N):
We confirm again with y
y Game Added! cod4 (/home/callofduty4/)
Now Punkbuster needs to be updated, it must be the EULA again be accepted.
If at you the following error occurs:
**ERROR: Downloading a global config file failed for the following reason: Couldn't resolve host 'websec2.evenbalance.com'
You give in your console
ping -c 1 websec2.evenbalance.com
you listed the IP, and adds an entry for websec2.evenbalance.com in your / etc / hosts. makes a ping on websec2.evenbalance.com, you record the IP and adds the IP together with websec2.evenbalance.com in the / etc / hosts.
Configuring and Starting
For the configuration I create /home/callofduty4/main/server.cfg a file.
http://workupload.com/file/o3ayyXUx (is .txt file)
The following points must necessarily be adapted:
sets sv_hostname "HostName here"
set net_ip "your.public.ip.here"
The IP of your server (IMPORTANT!)
set rcon_password "adminpassword" set sv_privatePassword "joinpassword"
RCON password: So you can during the game player kick / ban and change settings, which will be lost after a reboot of the server private password: If your server be full and you have to set sv_privateclients you kept open slots, you can so play on your server, although all "normal" slots are occupied.
set sv_maxclients "12" // MAX server player slots, this is TOTAL player slots
Maximum number of players on your server incl. Private clients
set sv_privateclients "3" // Number of private player slots, maxclients - privateclients = public slots
Number of private, reserved slots.
For the sake of convenience, I create even a small startup script that I call start.sh and save in /home/callofduty4/start.sh:
echo "./cod4_lnxded +exec server.cfg +set loc_language 2 +map_rotate" > /home/callofduty4/start.sh
To start the server as a user simply enter callofduty4 following:
If you want that the server continues to run when you end the SSH session, the CoD4 server start just in a screen-session ;)
Now you should be able to connect to the server by looking in the game (client) in the console
typing. If you connected a domain on your server and have not changed the port, you can also
type in the console.
The following ports must be opened: UDP 28960 UDP 20800 UDP 20810