Jump to content
Sign in to follow this  
benu

Linux server setup howto

Recommended Posts

again, hi biggrin_o.gif

Can anyone say on which distribs server runs?

Share this post


Link to post
Share on other sites
again, hi biggrin_o.gif

Can anyone say on which distribs server runs?

Let's see here...so far, I've made it run on

<ul>[*] Fedora Core 2,3,4 and 5 (FC2: both i686 and x86_64, the others i686)

[*] RedHat Enterprise Linux 4 / CentOS 4 (i686)

[*] Suse Linux Enterprise Server 8 (i686)

[*] Debian 3.0 (i686)

They all work if you follow the instructions in the first post of this thread and get the required compatibility libs.

Share this post


Link to post
Share on other sites

Killswitch

thanks

and what about freebsd and slackware? does someone try run it on that systems?

Share this post


Link to post
Share on other sites

It's unlikely that it'll not run on any distros, aslong as you can get all the depedancies sorted out.. It should be pretty universal..

- Ben

Share this post


Link to post
Share on other sites

one more question:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[ddk@ddk ofp]$ ./ofpserver start

Stopping OFP server...

Starting OFP server...

[ddk@ddk ofp]$ ./ofpserver status

Server should be running...

[ddk@ddk ofp]$ ./ofpserver check

OFP directory: /home/ddk/ofp OK

Server executable: /home/ddk/ofp/server OK

Port number: 2302

Config file: /home/ddk/ofp/server.cfg OK

PID file: /home/ddk/ofp/ofp_server.2302.pid

RUN file: /home/ddk/ofp/ofp_server.2302.run

but, where is no server aviable in "lan", also i can't connect by ip confused_o.gif

Share this post


Link to post
Share on other sites

This whole "watchdog" script might be useless on some machines/distros, somehow it doesnt work, period, so maybe consider runnig a process from a script with a command line, using "nohup" for example to loop the command

Share this post


Link to post
Share on other sites

problem solved yay.gif

it was a problems with access rights whistle.gif

and now another question smile_o.gif

why it didn't use config file, from player folder?

Share this post


Link to post
Share on other sites

OK, I've been using this forum to try & setup OFP on our new FC2 (from Redhat 9) server.  We transferred our OFP folder over, corrected the ofpserver script and got the seg fault right away.  Then, I made /ofp/libs with the enclosed downloaded libs linked in the above post & edited the ofpserver script again (following first post in this forum):

cd ${OFP_DIR}

   echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Starting server (port ${PORT})..."

export LD_LIBRARY_PATH=/home/djerden/ofp/libs  

${SERVER} >>${LOGFILE} 2>&1 -server -config=${CONFIG} -port=${PORT} -pid=${PIDFILE}

   if [ -f ${RUNFILE} ]; then

echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Server died, waiting to restart..."

sleep 5s

   else

echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Server shutdown intentional, watchdog terminating"

   fi

unset LD_LIBRARY_PATH

done    

;;

The server will start & run, but with "shutdown" command from admin in game for example, it throws a lot of errors in the nohup.out file:

Stopping OFP server...

Starting OFP server...

date: /home/djerden/ofp/libs/libc.so.6: version `GLIBC_2.3' not found (required by date)

date: /home/djerden/ofp/libs/libc.so.6: version `GLIBC_2.3.2' not found (required by /lib/tls/librt.so.1)

date: /home/djerden/ofp/libs/libc.so.6: version `GLIBC_PRIVATE' not found (required by /lib/tls/librt.so.1)

date: /lib/ld-linux.so.2: version `GLIBC_2.1.1' not found (required by /home/djerden/ofp/libs/libc.so.6)

date: /lib/ld-linux.so.2: version `GLIBC_2.2.3' not found (required by /home/djerden/ofp/libs/libc.so.6)

date: /lib/ld-linux.so.2: version `GLIBC_2.2' not found (required by /home/djerden/ofp/libs/libc.so.6)

date: /home/djerden/ofp/libs/libc.so.6: version `GLIBC_2.3.2' not found (required by /lib/tls/libpthread.so.0)

date: /home/djerden/ofp/libs/libc.so.6: version `GLIBC_PRIVATE' not found (required by /lib/tls/libpthread.so.0)

sleep: /home/djerden/ofp/libs/libc.so.6: version `GLIBC_2.3' not found (required by sleep)

sleep: /home/djerden/ofp/libs/libc.so.6: version `GLIBC_2.3.2' not found (required by /lib/tls/librt.so.1)

sleep: /home/djerden/ofp/libs/libc.so.6: version `GLIBC_PRIVATE' not found (required by /lib/tls/librt.so.1)

sleep: /lib/ld-linux.so.2: version `GLIBC_2.1.1' not found (required by /home/djerden/ofp/libs/libc.so.6)

sleep: /lib/ld-linux.so.2: version `GLIBC_2.2.3' not found (required by /home/djerden/ofp/libs/libc.so.6)

sleep: /lib/ld-linux.so.2: version `GLIBC_2.2' not found (required by /home/djerden/ofp/libs/libc.so.6)

sleep: /home/djerden/ofp/libs/libc.so.6: version `GLIBC_2.3.2' not found (required by /lib/tls/libpthread.so.0)

sleep: /home/djerden/ofp/libs/libc.so.6: version `GLIBC_PRIVATE' not found (required by /lib/tls/libpthread.so.0)

Any ideas how to resolve this, or does it matter?

Share this post


Link to post
Share on other sites

If it's working, I don't think it matters...

Just a random suggestion (to no one in particular), instead of using nohup for keeping the server up, might be an idea to use screen instead..

Basicly, you do (For example)

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">dbr@dbrlt1:~$ screen -L bash

dbr@dbrlt1:~$ ./ofpserver

Then, once you start the server, hold Ctrl+A, release and type D (detach)..

Then screenlog.0 will contatin it, orrr, type screen -r, and you can go back to the terminal you started the server in smile_o.gif

And other usefull things : Ctrl+A then C creates a new terminal.. Ctrl+A then P or N flicks between terminals..

Usefull when you log in via SSH, so if the network connection dies, you don't lose any running programs..

- Ben

Share this post


Link to post
Share on other sites
Any ideas how to resolve this, or does it matter?

Make sure you unset LD_LIBRARY_PATH right after the OFP server has stopped running:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">.

.

.

export LD_LIBRARY_PATH=/home/djerden/ofp/libs

${SERVER} >>${LOGFILE} 2>&1 -server -config=${CONFIG} -port=${PORT} -pid=${PIDFILE}

unset LD_LIBRARY_PATH

if [ -f ${RUNFILE} ]; then

.

.

.

Otherwise the sleep command won't work, and the echo command will not add the date in your log file.

Share this post


Link to post
Share on other sites

Added that, thanks. Don't guess that will affect those errors I posted.

Share this post


Link to post
Share on other sites
Added that, thanks. Don't guess that will affect those errors I posted.

It should though. date and sleep aren't working because of the LD_LIBRARY_PATH that's set to a directory that doesn't contain the right libs for them. After the unset, everything is back to normal, so date and sleep will be able to use the libraries they're meant to work with.

Share this post


Link to post
Share on other sites

Trying you set up server on linux but get the follow error at the log.

Quote[/b] ]WATCHDOG (6835): [Wed May 31 23:49:21 BST 2006] Starting server (port 6969)...

WATCHDOG (6835): [] Server died, waiting to restart...

WATCHDOG (6835): [Wed May 31 23:49:21 BST 2006] Starting server (port 6969)...

WATCHDOG (6835): [] Server died, waiting to restart...

WATCHDOG (6835): [Wed May 31 23:49:21 BST 2006] Starting server (port 6969)...

WATCHDOG (6835): [] Server died, waiting to restart..

and this is the full ofpserver file.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#!/bin/bash

#

# ofpserver: Operation Flashpoint Linux dedicated server control script

# (c) 2003 BIStudio

# OFP binary version must be 1.92 or later!

#

#=======================================================================

#======== CONFIGURATION PARAMETERS ========

#======== MUST BE EDITED MANUALLY TO FIT YOUR SYSTEM PARAMETERS ========

#=======================================================================

OFP_DIR=/home/user3/ofp/server

CONFIG=${OFP_DIR}/server.cfg

PORT=6969

PIDFILE=${OFP_DIR}/ofp_server.${PORT}.pid

RUNFILE=${OFP_DIR}/ofp_server.${PORT}.run

LOGFILE=${OFP_DIR}/log.${PORT}.txt

SERVER=${OFP_DIR}/server

MODS="@ecp;@rifles"

#=======================================================================

case "$1" in

start)

if [ -f ${RUNFILE} ]; then

$0 stop

fi

echo "Starting OFP server..."

# file to mark we want server running...

echo "go" >${RUNFILE}

# launch the background watchdog process to run the server

nohup </dev/null >/dev/null $0 watchdog &

;;

stop)

echo "Stopping OFP server..."

if [ -f ${RUNFILE} ]; then

# ask watcher process to exit by deleting its runfile...

rm -f ${RUNFILE}

fi

# and terminate OFP server process

if [ -f ${PIDFILE} ]; then

kill -TERM $(< ${PIDFILE})

if [ -f ${PIDFILE} ]; then

rm -f ${PIDFILE}

fi

fi

;;

status)

if [ -f ${RUNFILE} ]; then

echo "Server should be running..."

else

echo "Server should not be running..."

fi

if [ -f ${PIDFILE} ]; then

PID=$(< ${PIDFILE})

echo "PID file exists (PID=${PID})..."

if [ -f /proc/${PID}/cmdline ]; then

echo "Server process seems to be running..."

fi

fi

;;

check)

echo -n "OFP directory: ${OFP_DIR} "

if [ -d ${OFP_DIR} ]; then

echo "OK"

else

echo "MISSING!"

fi

echo -n "Server executable: ${SERVER} "

if [ -x ${SERVER} ]; then

echo "OK"

else

echo "ERROR!"

fi

echo "Port number: ${PORT}"

echo -n "Config file: ${CONFIG} "

if [ -f ${CONFIG} ]; then

echo "OK"

else

echo "MISSING!"

fi

echo "PID file: ${PIDFILE}"

echo "RUN file: ${RUNFILE}"

;;

restart)

$0 stop

$0 start

;;

watchdog)

# this is a background watchdog process. Do not start directly

while [ -f ${RUNFILE} ]; do

# launch the server...

cd ${OFP_DIR}

echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Starting server (port ${PORT})..."

export LD_LIBRARY_PATH=${OFP_DIR}/libs

${SERVER} >>${LOGFILE} 2>&1 -server -config=${CONFIG} -port=${PORT} -pid=${PIDFILE} -nomap -mod=${MODS}

if [ -f ${RUNFILE} ]; then

echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Server died, waiting to restart..."

sleep 5s

else

echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Server shutdown intentional, watchdog terminating"

fi

unset LD_LIBRARY_PATH

done

;;

*)

echo "$0 (start|stop|restart|status|check)"

;;

esac

Share this post


Link to post
Share on other sites

Check your network settings and user rights I would say...

Anyone other could possibly give more advise on that.

Share this post


Link to post
Share on other sites
Check your network settings and user rights I would say...

Anyone other could possibly give more advise on that.

Got it working, just now the mod folders wont work?

Is what I put right?

Share this post


Link to post
Share on other sites
i get this any idea why?

You have a malformed line somewhere in the "ofpstart" file. It is likely the line that sets the mod to be used, ie the line that reads something like

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">MODS="@ecp;@rifles"

Your server seems to be loading "@<censored>;#============================"

Make sure that MODS=... is syntactically clean. For example, you might be missing the last quote character.

Share this post


Link to post
Share on other sites

My server won't load either. I've made a post about it here; http://www.flashpoint1985.com/cgi-bin....t=52575

I've DLed the libs and edited the ofpserver-file, but the behaviour is stil the same. Any ideas?

WATCHDOG (18030): [ons jun 28 02:36:28 CEST 2006] Starting server (port 2302)...

WATCHDOG (18030): [ons jun 28 02:36:28 CEST 2006] Server died, waiting to restart...

WATCHDOG (18030): [ons jun 28 02:36:33 CEST 2006] Starting server (port 2302)...

WATCHDOG (18030): [ons jun 28 02:36:33 CEST 2006] Server died, waiting to restart...

Edit: Problem solved

Share this post


Link to post
Share on other sites
Guest RKSL-Rock

Hey guys,

I'm having a little problem wiht permissions. Cna some one give me some guidence on what permissions to set.

Its an FC4 box, I've followed all the instructions in this thread and im just getting

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[ofp@<myserver> ofps]$ ./ofpserver start

-bash: ./ofpserver: Permission denied

Where <myserver> is my hostname.

Any ideas?

Share this post


Link to post
Share on other sites
Hey guys,

I'm having a little problem wiht permissions. Cna some one give me some guidence on what permissions to set.

Its an FC4 box, I've followed all the instructions in this thread and im just getting

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[ofp@<myserver> ofps]$ ./ofpserver start

-bash: ./ofpserver: Permission denied

Where <myserver> is my hostname.

Any ideas?

You need to set the executable (x) permission on that script:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">chmod +x ofpstart

Share this post


Link to post
Share on other sites
Guest RKSL-Rock

EDIT ignore me got it fixed thanks!

Share this post


Link to post
Share on other sites

Does anyone have a mirror of the older libs?

edit: or does someone want to lend a helping hand and do it for me? biggrin_o.gif

Share this post


Link to post
Share on other sites

Ok, I got it running half-way. At least it's running more than before.

Now, when I use ./ofpserver start to start the server, it actually actually does start running but then it stops running because it says it can't create it on 2302. However that must be a lie because I can see the server in the OFP server selection screen and I can connect slightly... puts me in on a blank "waiting for server" screen - doesnt say that "myname is connecting" though - and it disconnects me immediately thereafter...

I've read the previous things on this thread but no one offers an explanation in any language I can understand.

Server creation failed : 2302

WATCHDOG (28023): [] Server died, waiting to restart...

WATCHDOG (28023): [Wed Jul 26 18:36:07 PDT 2006] Starting server (port 2302)...

18:36:07 Dedicated server created, memory used: 4116 KB

Server creation failed : 2302

WATCHDOG (28023): [] Server died, waiting to restart...

WATCHDOG (28023): [Wed Jul 26 18:36:22 PDT 2006] Starting server (port 2302)...

18:36:23 Dedicated server created, memory used: 4116 KB

Server creation failed : 2302

Share this post


Link to post
Share on other sites

Hi all,

I'm having problems adding mods to a Linux ( Ubuntu ) server. I've seen a few scripts here and they not worked for me for one or another reason mainly due lack of know how to with the script. some times i get watchdog error stringtable.csv

So could some one post more the right script that surly works and tell me were to put it in the ofpserver ?

I'm allso getting random missions when you select one. Had the problem b4 and fixed it it was just some time ago.

Thank You.....

Blackdog if you still need libs i would zip mine up for u and host them for a few days for you.

I had that problem ( Server creation failed : 2302 ). BUT i cannot help you had a friend of a friend to solve it for me. And he not got back to me how he did it.

Let me know

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×