Welcome to Soldier of Fortune Community Forums
20 Aug 2018, 05:40


View unanswered postsView active topics



Reply to topic  [ 28 posts ]  Go to page 1, 2  Next
SOF server on LINUX 
Author Message
Poland

User avatar

Joined:
Sun Jan 18th, 2015
Location: Gorzów Wielkopolski
Posts: 28
Reply with quote
Hey. How can i put SoF server on linux?

Step by step........

its no problem like in win?


07 Apr 2015, 13:06
Profile WWW
Israel

User avatar

Joined:
Sun Dec 04th, 2011
Posts: 384
Reply with quote
Ctrl wrote a page about this, and also playing SoF on linux using "W.i.n.e" found here:
SoF - Soldier of Fortune in Wine on Linux, BSD or Mac OS X


07 Apr 2015, 13:27
Profile
Netherlands

User avatar

Joined:
Wed Nov 23rd, 2011
Location: Netherlands
Posts: 4064

Evilan
evilan
Reply with quote
Is that page recent made ? Few weeks ago Keifer had a problem with sof linux servers... and Ctrl information was outdated.


07 Apr 2015, 13:32
Profile
Netherlands

User avatar

Joined:
Mon Jun 25th, 2012
Posts: 112
Reply with quote
Evil4N wrote:
Is that page recent made ? Few weeks ago Keifer had a problem with sof linux servers... and Ctrl information was outdated.

It should still work when running original unpatched SoF platinum. The patching should not be needed with SoFplus, but I released the wrong SoFplus server 20140531, which may not work with Wine (it was compiled for Windows 2000 for MH®).

Here's a copy/paste from an email I sent to someone a few weeks ago. It's for running a dedicated server on a headless (debian) linux machine:

Quote:
Here's some information. I wrote this manual a few years ago, when I was still using debian squeeze, but it's similar on wheezy and jessie. If you need additional information, please let me know.

I've been running my own headless servers on Linux for years without problems.

You'll need X, but if you have a headless server, you can make it work by using something like xvfb (or x11vnc).

I'm installing the following additional software on my headless (debian squeeze) servers:
   wine xvfb xauth

Run something in wine to let it create your initial wine environment (e.g. 'wine cmd').

I made a script to extract all needed files from the SoF cd-rom, so you don't have to copy from a working SoF installation. Unfortunately, I can't find it right now, so do this instead:
Copy the files from a working SoF installation to the /home/USER/.wine/drive_c/ directory (e.g. /home/USER/.wine/drive_c/SoF1/).

To make the server crash and rcon-hack proof, you should install SoFplus server 20140531 from:
   SoFplus - Soldier of Fortune addon (aka SoF+ or SoF plus)
2015-03-20 note:
   You need a recent SoFplus server and client now because the official GameSpy servers have been shutdown.

You can start the server like this:
On a headless server:
$ cd /home/USER/.wine/drive_c/SoF1
$ xvfb-run -a wine SoF-spsv.exe +set dedicated 1 +set hostport 28910 +set gamespyport 28911 +set user ./user-server +set logfile 3 +set sv_violence 32
If you want to run it on your desktop, you can simply run:
$ cd /home/USER/.wine/drive_c/SoF1
$ wine SoF-spsv.exe +set dedicated 1 +set hostport 28910 +set gamespyport 28911 +set user ./user-server +set logfile 3 +set sv_violence 32

Depending on the used wine version, the server may fail to start, because AllocConsole doesn't work. Look here for a solution:
   http://sof1.megalag.org/wine.php#dedicated_server
Instead of this solution, I can also provide a modified spsv.dll that works with wine without manual patching:
   http://sof1.megalag.org/sofplus/downloa ... 1-wine.zip
2015-03-20 note:
  I don't know if the manual patching method still works with SoFplus 20140531. It used to work with older versions a few years ago.

I'm using dtach for all my game servers (not just SoF), so I can reattach to the server console at a later date. For other games I can use it to execute console commands, but for SoF, it can only be used to stop the server by pressing Ctrl-C. You may or may not see console output on the screen. That depends on the wine version (I don't get console output on the wine version that comes with debian squeeze, but it works for me on debian wheezy). Instead of dtach, you could also use screen (or nothing at all).


07 Apr 2015, 21:36
Profile
Poland

User avatar

Topic author
Joined:
Sun Jan 18th, 2015
Location: Gorzów Wielkopolski
Posts: 28
Reply with quote
machine with 1ghz procesor and 1gb ram is good for Sof server ??  :P


09 Apr 2015, 09:18
Profile WWW
Canada

User avatar

Joined:
Wed Jan 22nd, 2014
Posts: 147
Reply with quote
What processor?

In 2000 I used to run a 10/ 12 slot Assassin server on an Intel PIII Celeron 800MHz overclocked to 1066MHz with 192MB of RAM. Server was always smooth and fast.

I stopped calculating as computers and Internet got faster but used something like:

16MB of RAM per player for standard maps /32MB per player for custom maps.

CPU, 100MHz per player.

WAN up/ upload I used 16Kbps/ 32Kbps per player (I was on Business ADSL 1.5Mb/ 640Kb)

This was on Windows ME, Linux be less demanding.

Hard drive speed, overall system state is important too.

Hope this help a bit till others chime in.


09 Apr 2015, 10:23
Profile
Netherlands

User avatar

Joined:
Mon Jun 25th, 2012
Posts: 112
Reply with quote
Bred wrote:
machine with 1ghz procesor and 1gb ram is good for Sof server ??  :P
I'm running 8 SoF servers in a virtual machine. The VM is consuming about 80% of a single 2.67 GHz Xeon core, even when the SoF servers are empty. About 600 MB of memory is used.
Recent Wine versions are less efficient than old versions (Wine 0.9.something from around 2005). With old versions, CPU consumption was around 0% when the SoF servers were empty. I've not investigated what causes this, because my current machine is fast enough.

Advice:
  • Do not rent a Linux server unless you've managed to make it run on a machine at home. It always worked for me, but some people have tried and failed to make it work.
  • Do not use a GUI, because a GUI does not belong on a server. Install a headless, gui-free server and learn how to use SSH and the command line.


09 Apr 2015, 19:33
Profile
Poland

User avatar

Topic author
Joined:
Sun Jan 18th, 2015
Location: Gorzów Wielkopolski
Posts: 28
Reply with quote
to cut sliding i need put this to "1" ? now is set _sp_sv_slide_fix  "0"


09 Apr 2015, 20:41
Profile WWW
Netherlands

User avatar

Joined:
Wed Nov 23rd, 2011
Location: Netherlands
Posts: 4064

Evilan
evilan
Reply with quote
Bred wrote:
to cut sliding i need put this to "1" ? now is set _sp_sv_slide_fix  "0"


yep


09 Apr 2015, 23:08
Profile
Poland

User avatar

Topic author
Joined:
Sun Jan 18th, 2015
Location: Gorzów Wielkopolski
Posts: 28
Reply with quote
Last one :P

Who much transfer i need per month for sof server. Limit 100Gb i enough ? or more? Sof serwer use 1-2Gb transfer per day or more or? I think its strange question :D


10 Apr 2015, 07:30
Profile WWW
Canada

User avatar

Joined:
Wed Jan 22nd, 2014
Posts: 147
Reply with quote
Had to edit/ delete since the thread moved.


11 Apr 2015, 18:12
Profile
Netherlands

User avatar

Joined:
Mon Jun 25th, 2012
Posts: 112
Reply with quote
For unknown reasons, my reply was moved somewhere else: Equal ping for everyone


11 Apr 2015, 22:27
Profile
Netherlands

User avatar

Joined:
Wed Nov 23rd, 2011
Location: Netherlands
Posts: 4064

Evilan
evilan
Reply with quote
Bred wrote:
machine with 1ghz procesor and 1gb ram is good for Sof server ??  :P


Live monitor details of i3d.net Germany PUBLIC server. With procesor and ram usage. See Right bottom corner of image to confirm the live date+time

Image


19 Aug 2015, 04:27
Profile
Ukraine

User avatar

Joined:
Fri Aug 21st, 2015
Posts: 21
Reply with quote
Im slowly starting to give up with this crap lol.

On linux i finally get passed all the wine errors etc... Now i face a new challenge.

When i have a "map dm/irqdm1" in the dedicated it doesn't load the server and contains a wine error, thus removing the map rotation from the dedi.cfg I'm able to get to "Soldier of fortune initialized" Yet the server nor map loads; both xvfb-run and dtach don't like this.

Log with no map set in dedicated; command i use and put a map in but still refuses to load.

Quote:
$ dtach -A -c wine SoF-spsv.exe +set dedicated 1 +set hostport 28910 +set gamespyport 28911 +set user ./user-server +set logfile 3 +set sv_violence 32 +set map dm/jpnctf1

Spoiler:


Error with a map rotation (Using XVFB-Run this time)

Code:
xvfb-run -a wine SoF-spsv.exe +set dedicated 1 +set hostport 28910 +set gamespyport 28911 +set user ./user-server +set logfile 3 +set sv_violence 32


Spoiler:


There are no Pid's running for SoF but asoon as it tries to load a map from SoF it just crashes or gives me this error.
Quote:
ERROR: Couldn't allocate dedicated server IP port


Changing the Wine default settings for SoF compatibility makes slight difference.
I obtain errors on anything below Windows XP


21 Aug 2015, 10:51
Profile
Ukraine

User avatar

Joined:
Fri Aug 21st, 2015
Posts: 21
Reply with quote
UpdaTE -- xvfb-run -a wine SoF-spsv.exe +set dedicated 1 +set hostport 28910 +set gamespyport 28911 +set user ./user-server +set logfile 3 +set sv_violence 32 +ip 5.196.94.78 +map dm/jpn2014

Spoiler:


21 Aug 2015, 13:12
Profile
Canada

User avatar

Joined:
Wed Jan 22nd, 2014
Posts: 147
Reply with quote
I would prolly ask Ctrl

301 Moved Permanently

Never seen "+map dm/xxxxx" in the batch file, just tried it on my server and I was pushed to localhost and went invisible on the server list, timelimit didn't work as well. Just from the console, did not try to connect to it!!!! But I run WIndows.

Since I never ran SoF on Linux, I can't help.


21 Aug 2015, 17:48
Profile
Ukraine

User avatar

Joined:
Fri Aug 21st, 2015
Posts: 21
Reply with quote
I know its uncommon, same with the IP; i can't seem to make it function either way i try it; i've done this at home plenty of times on different linux based os's bur i just can't get it running on a headless server; i may have to figure a different company or a different way around it :)

my Display environment to connect to my vncserver is spot on and it should work but this port issue, i've checked through the config and cannot reveal a result.


22 Aug 2015, 00:30
Profile
Canada

User avatar

Joined:
Wed Jan 22nd, 2014
Posts: 147
Reply with quote
In Windows when I added +map dm/jpnctf1 to the server-start.bat, it disabled my maplistfile, changed timelimit to "unlimited" and somehow my WAN IP was not seen, so server went off the server list and I was on 127.0.0.1 (localhost) !

What does adding +set map do on Linux?


22 Aug 2015, 02:16
Profile
Ukraine

User avatar

Joined:
Fri Aug 21st, 2015
Posts: 21
Reply with quote
Apparently nothing, i just wanted to see if it would initialize, it does but not on stable conditions.


Code:
/home/28910# dtach -A -c wine SoF-spsv.exe +set dedicated 1 +set hostport 28910 +set gamespyport 28911 +set user ./user-server +set logfile 3 +set sv_violence 32


Spoiler:


Code:
wine SoF-spsv.exe +set dedicated 1 +set hostport 28910 +set gamespyport 28911 +set user ./user-server +set logfile 3 +set sv_violence 32 +set developer 1


Spoiler:


22 Aug 2015, 11:04
Profile
Netherlands

User avatar

Joined:
Mon Jun 25th, 2012
Posts: 112
Reply with quote
Night wrote:
Apparently nothing, i just wanted to see if it would initialize, it does but not on stable conditions.
Wine should also print some information that will help me debug the problem. Can you send that to me (sof1@megalag.org)? Is your server running on a dedicated machine or on a VPS (and what type of VPS)? What distribution (and which version) are you using and is it using SELinux or AppArmor?


22 Aug 2015, 14:50
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 28 posts ]  Go to page 1, 2  Next
Topic Views: 2314


Who is online

Users browsing this forum: No registered users and 1 guest


Top
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Group
www.sof1.org