Jump to content



Photo

Setting Up Cod 4 Linux Server On Your Vps


  • Please log in to reply
5 replies to this topic

#1 Arctic

Arctic

    Haphost Staff

  • Moderators
  • 341 posts
  • LocationGermany

Posted 01 November 2014 - 08:06 PM

Preparations

 

First, I put a new user for the Callofduty4 server and wget INSTALLING (if it is not already installed)

useradd -m callofduty4

Centos:

yum install -y wget

Debian:

aptitude install wget

Download the Server Files

http://limit.1337-server.net/cod4/cod4_1.7_full_linux.tar.bz2

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:

./pbsetup.run -e

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.

Example configuration:

http://workupload.com/file/o3ayyXUx (is .txt file)

The following points must necessarily be adapted:

sets sv_hostname "HostName here"
 
As your server is to say, he will then appear in clients such as HLSW etc.
 
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:

sh start.sh

If you want that the server continues to run when you end the SSH session, the CoD4 server start just in a screen-session ;)

 

 

Connect

 

Now you should be able to connect to the server by looking in the game (client) in the console

 connect 12.34.56.789:28960

typing. If you connected a domain on your server and have not changed the port, you can also

connect domain.tld

type in the console.


The following ports must be opened: UDP 28960 UDP 20800 UDP 20810

 

 

 

 


any support PM's be Ignored please use the Support section for it

 

Support


#2 i7ach1

i7ach1

    Member

  • Members
  • PipPip
  • 15 posts

Posted 03 November 2014 - 10:52 PM

Only one thing, needs to install "screen" and execute CoD4 inside it.

 

Regards.



#3 Arctic

Arctic

    Haphost Staff

  • Moderators
  • 341 posts
  • LocationGermany

Posted 04 November 2014 - 05:02 PM

Only one thing, needs to install "screen" and execute CoD4 inside it.

 

Regards.

this should really be logically yes


any support PM's be Ignored please use the Support section for it

 

Support


#4 Onoicien

Onoicien

    Newbie

  • Members
  • Pip
  • 9 posts
  • LocationHungary

Posted 04 November 2014 - 08:20 PM

Server closes after a few minutes running. You also met this problem?

to unpack? haphost 10GB disk space 
Download and unpack more than 10GB
 
I'm uploaded own game file-s


#5 Arctic

Arctic

    Haphost Staff

  • Moderators
  • 341 posts
  • LocationGermany

Posted 04 November 2014 - 08:37 PM

 

Server closes after a few minutes running. You also met this problem?

to unpack? haphost 10GB disk space 
Download and unpack more than 10GB
 
I'm uploaded own game file-s

 

you should delete the file after unzip


any support PM's be Ignored please use the Support section for it

 

Support


#6 Onoicien

Onoicien

    Newbie

  • Members
  • Pip
  • 9 posts
  • LocationHungary

Posted 05 November 2014 - 01:15 PM

compressed file 6.4gb  - > unziping - > 13gb (out of disk space)

alternative idea??






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users