Jump to content
Sign in to follow this  
benu

Linux server setup howto

Recommended Posts

Sorry if this is a dumb question, but does a linux server use the same type of .cfg file for server settings like admin password, file checking, etc. like a windows server?

Share this post


Link to post
Share on other sites

Debian 3.1 (Sarge) upgrade, from 3.0, server stopped working, wouldn't start anymore.

"Server creation failed : 2302"

issued "apt-get install nscd" and it works again.

--fd

Share this post


Link to post
Share on other sites
Debian 3.1 (Sarge) upgrade, from 3.0, server stopped working, wouldn't start anymore.

"Server creation failed : 2302"

issued "apt-get install nscd" and it works again.

--fd

Unfortunately Debian has now declared some stuff the OFP server uses to be obsolete.

The server will no longer start in etch (unstable).

Sarge should be fine for now.

We really need a relinked binary. sad_o.gif

Share this post


Link to post
Share on other sites

Hi.

Quote[/b] ]After that you have to edit the ofpserver script that came with the server files.
I didn't understand which file i must edit?

Share this post


Link to post
Share on other sites

The error messages tell us that you need two things:

<ul>[*] The uudecode program, most often delivered in a package called "sharutils"

[*] The GCC compiler package

Tell me/us what Linux distribution you are using and someone might be able to tell you more in detail what you need to do.

Share this post


Link to post
Share on other sites

Killswitch

Yea, you are right, but i already fix that problem and now have ahother: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">19:40:31 Dedicated server created, memory used: 4028 KB

Segmentation fault

as written at 1st page i must edit server config file, but i don't know which one confused_o.gif

Share this post


Link to post
Share on other sites

Actually, that problem most likely comes from the ofp server needing some older system libraries. The solution to that is described very well in benu's first post. You need to get the libraries, unpack them and edit the ofp start script, "ofpserver", as shown in the first post. Editing of the server config file is a later stage.

Share this post


Link to post
Share on other sites
Quote[/b] ]You need to get the libraries, unpack them and edit the ofp start script, "ofpserver", as shown in the first post.
i have already did it, but again:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Segmentation fault confused_o.gif

One more question: how i must start server?

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

or

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ofpserver startas written there ?

Share this post


Link to post
Share on other sites
Quote[/b] ]You need to get the libraries, unpack them and edit the ofp start script, "ofpserver", as shown in the first post.
i have already did it, but again:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Segmentation fault
confused_o.gifAre you sure? Seeing as how you've had trouble understanding benu's howto before in this thread, let's just make certain. Tell me this:

<ul>[*] Where is your ofp server installed? (exact path)

[*] Where are those extra libraries you downloaded installed (exact path)

[*] List the contents of both the base ofp server folder and the folder with the libs

[*] Show me the output of "grep LD_LIBRARY_PATH ofpserver", issued when standing in the base ofp server folder

Quote[/b] ]One more question: how i must start server?

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

as written in manual

or

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ofpserver startas written there ?

Think about that for a second. After having gone through the trouble of editing "the ofp <span style='color:green'>start script</span>, 'ofpserver'", what would be your guess of how you would <span style='color:green'>start</span> the ofp server? (Hint: it's not "./server")

Share this post


Link to post
Share on other sites
Quote[/b] ]Where is your ofp server installed? (exact path)
/var/ofp/
Quote[/b] ]Where are those extra libraries you downloaded installed (exact path)
/var/ofp/libs/
Quote[/b] ]List the contents of both the base ofp server folder and the folder with the libs

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">addons       dta             mpmissions       readme.txt   templates

ban.txt      flashpoint.cfg  ofpr_server.bat  res          tolower

bin          flashpoint.rpt  ofpserver        server       tolower.c

campaigns    libs            preferences.csv  server.cfg   users

context.bin  missions        products.cfg     sptemplates  worlds

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ld-linux.so.2  libc.so.6  libnss_dns.so.2  libnss_files.so.2  libresolv.so.2

Quote[/b] ]Show me the output of  "grep LD_LIBRARY_PATH ofpserver", issued when standing in the base ofp server folder

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ofp]# grep LD_LIBRARY_PATH ofpserver

export LD_LIBRARY_PATH=/var/ofp/libs

          unset LD_LIBRARY_PATH

Share this post


Link to post
Share on other sites

Thanks. Except for two things, everything looks OK:<ul>[*] You've put the ofp server in the /var filesystem/tree. That's sort of like installing programs into C:\WINDOWS\TEMP in Windows... biggrin_o.gif

[*] You shouldn't run the ofp server process as root. Ever.

Following proper practices, you would:

<ul>[*] Install third-party programs such as the OFP server into /opt (eg /opt/ofp) or /home/<some user>

[*] Create a new user, <some user>, that will run the ofp server (say "ofps", "ofp_server" or whatever suits your fancy)

While those things are how it ought to be done, they won't solve the problem at hand. As far as I can tell, starting the server using "./ofpserver start" with your current setup should...well, work.

I'd look into the other points benu mentioned - ie making sure your network configuration is setup alright - proper hostname, /etc/resolv.conf, /etc/hosts and possibly install and run the nscd service. What distribution are you running? Perhaps someone out there in OFP land has experience in running the OFP server on just that distribution.

Share this post


Link to post
Share on other sites
You've put the ofp server in the /var filesystem/tree. That's sort of like installing programs into C:\WINDOWS\TEMP in Windows... biggrin_o.gif

i know, i put it there just for test.

Quote[/b] ]ofp]$ ./ofpserver start

: bad interpreter: No such file or directory

confused_o.gif

my distrib is based on Redhat Linux Fedora 2

Share this post


Link to post
Share on other sites
Quote[/b] ]
Quote[/b] ]ofp]$ ./ofpserver start

: bad interpreter: No such file or directory

confused_o.gif
It looks like you've botched the start script. The very first line of that script must be exactly this:

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

Also, are you really quoting me the full error message there? It seems that you take great care to edit away parts of the command prompt (which looks like "[user@somewhere ofp]$" in a normal bash shell. If you do this for security reasons, I'm perfectly fine with that. I don't need to know what the prompt says, nor does anyone else. I just suspect there are parts missing from the line that reads ": bad interpreter: No such file or directory"...

Quote[/b] ]my distrib is based on Redhat Linux Fedora 2
Ok. You use FC2. That's good because I know that the ofp server runs just fine on it.

Share this post


Link to post
Share on other sites
The very first line of that script must be exactly this:

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

first line in my start script same
Also, are you really quoting me the full error message there? It seems that you take great care to edit away parts of the command prompt (which looks like "[user@somewhere ofp]$" in a normal bash shell. If you do this for security reasons, I'm perfectly fine with that. I don't need to know what the prompt says, nor does anyone else. I just suspect there are parts missing from the line that reads ": bad interpreter: No such file or directory"...
I write here full messages, except username and host. Where was no parts before ": bad interpreter: No such file or directory". (i use "putty", if it important)

In start script i find such line:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">SERVER=${OFP_DIR}/server

so, if my server files located at OFP_DIR, mb i must edit this line?

Share this post


Link to post
Share on other sites
In start script i find such line:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">SERVER=${OFP_DIR}/server

so, if my server files located at OFP_DIR, mb i must edit this line?

OFP_DIR is a variable set somewhere at the beginning of this file. You HAVE TO set the path to your ofp directory there. This is also described in the 1st post by benu!!!

Share this post


Link to post
Share on other sites

Sorry, i was wrong. I thought that "/server" - is a directory there located server files icon_rolleyes.gif

Share this post


Link to post
Share on other sites

No, unfortunaly.

still:

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

: bad interpreter: No such file or directory

Share this post


Link to post
Share on other sites
No, unfortunaly.

still:

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

: bad interpreter: No such file or directory

hum...

What's the output of these commands on your system?

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

which bash

bash --version

Share this post


Link to post
Share on other sites

Could it be that you have somehow gotten the start script infected with DOS-style line endings, say by editing the file ofpstart with Notepad in Windows? That's an excellent way to cock up a script... The solution? Fix it using "dos2unix" from the package...yep, you guessed it, "dos2unix":<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">dos2unix ofpstartshould do it. That program will convert DOS-style line endings to Unix ones. If you haven't got dos2unix, install it by

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">yum -y install dos2unix

Share this post


Link to post
Share on other sites
What's the output of these commands on your system?

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

which bash

bash --version

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

/bin/bash

bash --version

GNU bash, version 2.05b.0(1)-release (i386-redhat-linux-gnu)

Share this post


Link to post
Share on other sites

again me....

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

./ofpserver: line 119: syntax error near unexpected token `newline'

./ofpserver: line 119: `MODS="mod1;mod2"'

Share this post


Link to post
Share on other sites

Did you do dos2unix ofpstart??? If not do it after the next change...

Change in line 119 MODS="mod1;mod2" to MODS="" if you don't need any mods else enter your mod folder names there.

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  

×