Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 79 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Soldier of Fortune
Category: SoFII Server Support
Server administration questions, comments and chat.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Linux Server Setup How-To
geronimo~rb
General Member
Since: Dec 23, 2006
Posts: 180
Last: Dec 23, 2006
[view latest posts]
Level 4
Category: SoFII Server Support
Posted: Saturday, May. 25, 2002 10:28 pm
The first thing you will want to do is install the necessary files.  Create a directory from which you will want to serve your sof2 game, as well as a base dir.  You will want to end up with a path that looks like:
/usr/local/games/sof2/base

From *both* of your SoF2 game CDs, copy the contents of the cdrom/Setup/base directories into your /usr/local/games/sof2/base directory.

Next, create a server.cfg file, and a ctf.mapcycle file, and place both of these in your /usr/local/games/sof2/base directory as well.  For great examples as to what to place in each files, RamRod has posted these up here.
*Note: if the name of your .mapcycle file is too long, such as ctfinf.mapcycle, the server will complain that the file cannot be found.  Try to keep the name length to a minimum.
Also, a complete (I believe) list of commands and cvars can be found here

Now we need to download the actual linux binary.  We can get this from here.

Place this file, sof2dedlinux100.zip, into your /usr/local/games/sof2 directory and unzip it ( >unzip sof2dedlinux100.zip ).  You should now have a sof2ded file in your /usr/local/games/sof2 directory.

Let's make sure it has the correct permissions by doing the following at the command line prompt:
> chmod a+x sof2ded

Hopefully, if all went well, it should be good to go.

We can test this by running the command:
./sof2ded +set dedicated 2 +exec server.cfg

You will probably eventually want to create a fuller command line, something like:
./sof2ded +set dedicated 2 +set net_ip xxx.xxx.xxx.xxx +set net_port 20100 +exec server.cfg

Also, It seems that in order to run a pure server, the pure cvar must also be placed in the command line:
+set sv_pure 1

If you want to use screen to keep the server running in the background, type the following from the /usr/local/games/sof2 dir:
screen -A -m -d -S sof2 ./sof2ded +set dedicated 2 +set net_ip xxx.xxx.xxx.xxx +set net_port 20100 +exec server.cfg

Your server is now detached from the console and running in the background.  To re-attach the server to the console, type:
screen -r sof2

You can now interract directly with your server from the console window.  To again detach the server from the console and put it back into the background, press CTRL+a and then press d

To see a list of everything running under screen, you can use:
screen -ls

Lastly, to make the process of starting and stopping the server a bit easier, let's go into your home directory and do the following:
cd /home/username
touch sof2
chmod +x sof2

This creates a file called "sof2".  Open this file up in a text editor such as vi or emacs, and place the following two lines inside:
cd /usr/local/games/sof2
screen -A -m -d -S sof2 ./sof2ded +set dedicated 2 +set net_ip xxx.xxx.xxx.xxx +set net_port 20100 +exec server.cfg

Now the only thing you have to do to run your server is from your home dir type:
./sof2

Remember, this example runs the game under screen, so follow the screen directions above to re-attach and detach the server from the console.

As an additional note, never run the server as root - always run it as a normal user.

Good luck!
Share |
montybass~rb
General Member
Since: Dec 23, 2006
Posts: 290
Last: Dec 23, 2006
[view latest posts]
Level 5
Category: SoFII Server Support
Posted: Saturday, May. 25, 2002 11:05 pm
Well done! I was going to wait for the Linux server to be fixed to write something, but you just saved me the trouble. My only concern:

+set net_ip x.x.x.x

Do not add that to the command line, unless you only want the server to run on one specific interface (ugh, I've had enough trouble with interfaces today). Also, a newbie may think that he has to add his external IP if he is behind a router; that is not the case. To his computer, 10.x.x.x (or whatever) is his IP.

I just use Aphextwin's SOF2 Runner to make my files, and they work great. I have my Linux box mapped as a Z: drive on my Windows box, so it looks there for what it needs.

Oh, and thanks for the screen switches. I've just been using CONTROL-A D to detach, and screen -r to re-attach.
Share |
geronimo~rb
General Member
Since: Dec 23, 2006
Posts: 180
Last: Dec 23, 2006
[view latest posts]
Level 4
Category: SoFII Server Support
Posted: Sunday, May. 26, 2002 12:07 am
Very good point!
Share |
geronimo~rb
General Member
Since: Dec 23, 2006
Posts: 180
Last: Dec 23, 2006
[view latest posts]
Level 4
Category: SoFII Server Support
Posted: Sunday, May. 26, 2002 11:21 pm
bump
Share |
ReverendTed~rb
General Member
Since: Dec 23, 2006
Posts: 2198
Last: Dec 23, 2006
[view latest posts]
Level 8
Category: SoFII Server Support
Posted: Monday, May. 27, 2002 06:47 pm
Shouldn't have to bump it again.  I pinned it.  If anyone has anything extra to add, just tack it on.
Share |
montybass~rb
General Member
Since: Dec 23, 2006
Posts: 290
Last: Dec 23, 2006
[view latest posts]
Level 5
Category: SoFII Server Support
Posted: Thursday, Jul. 11, 2002 06:20 pm
Since this wasn't fixed in the 1.01 patch :s15:, I decided to add it to this thread.

If you're running a Linux server, and you get "CLIENT_UNKNOWN_TO_AUTH" when connecting to your server locally (via the LAN), here is the solution:

My original /etc/hosts file was

127.0.0.1 localhost.localdomain localhost
64.81.99.99 server.speakeasy.net server
10.0.0.4 server.speakeasy.net server


I changed it to

10.0.0.4 server.speakeasy.net server
64.81.99.99 server.speakeasy.net server
127.0.0.1 localhost.localdomain localhost


and the problem went away. Apparently, the game only reads the first two lines in the /etc/hosts file, and anything after that is ignored.
Share |
Apoxol~rb
General Member
Since: Dec 23, 2006
Posts: 2139
Last: Dec 23, 2006
[view latest posts]
Level 8
Category: SoFII Server Support
Posted: Thursday, Jul. 11, 2002 06:25 pm
If anything it has nothing to do with the game it has to do with the gethostbyname call in linux.  We fixed one bug in the game code that had to do with missing ips, but I dont know why the gethostbyname function would miss that ip.
Share |
montybass~rb
General Member
Since: Dec 23, 2006
Posts: 290
Last: Dec 23, 2006
[view latest posts]
Level 5
Category: SoFII Server Support
Posted: Thursday, Jul. 11, 2002 06:31 pm
As we discussed before, this is the only game I've had that problem with, and I'm not the only one with that problem. I did notice with Red Hat 7.2 that it had this problem with other games such as RTCW, but that happened with all interfaces, not just the local one.

It's just a minor nuisance to deal with. I may try adding a third NIC in my computer and see what happens.
Share |
amber~rb
General Member
Since: Dec 23, 2006
Posts: 24
Last: Dec 23, 2006
[view latest posts]
Level 1
Category: SoFII Server Support
Posted: Thursday, Jul. 11, 2002 07:35 pm
after adding the new dem maps to our mapcycle, my friends an i get the following error everytime we try to cycle through the maps in the server

ERROR: mapcycle file 'ctf.mapcycle' not found

does anyone know what we shoudl do to fix this?

thanks.
Share |
Rizod~rb
General Member
Since: Dec 23, 2006
Posts: 3
Last: Dec 23, 2006
[view latest posts]
Level 0
Category: SoFII Server Support
Posted: Thursday, Jul. 11, 2002 08:53 pm
For the problem amber is refering to, the problem occurs with even short file names like d.mapcycle or ctf.mapcycle.

We're only having the problem after installing the 1.01 patch.
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Soldier of Fortune : SoFII Server Support

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»