running a server on linux (ubuntu)

Need help seting up a server, or have a question on how to run one? This is the place.
Post Reply
User avatar
big_daddy2
Private First Class
Private First Class
Posts: 131
Joined: Sat May 06, 2006 1:06 am
Location: the middle of nowhere, USA

running a server on linux (ubuntu)

Post by big_daddy2 »

i recently have gotten ubuntu on my computer and i am wondering...HOW DO I SET UP MY SERVER ON IT

its very simple with windows and the bzfs.exe but i dont know if thats what it is called or where it is located, please help
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Post by joevano »

Well looks like you got more learning to do...

Here is a link to a good start: http://my.bzflag.org/w/Creating_A_Server

There are instructions in there, but... linux is not as "user friendly" as Windows. Things are pretty different under the hood, so you should probably learn some basic skill on Linux that you will need to master before taking on this challenge. A few of them are using "Terminal" (the command prompt), navigating around from command line, file permissions, reading a man page, usual locations where files are kept, and compiling. Compiling is not required, but if you want the latest version of bzflag (and you usually do on server) then compiling is a must.
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
Longhair
Private First Class
Private First Class
Posts: 330
Joined: Tue Feb 08, 2005 6:06 pm
Location: Lancaster, PA
Contact:

Post by Longhair »

its very simple with windows and the bzfs.exe but i dont know if thats what it is called or where it is located, please help
Assuming you've started bzfs.exe from a DOS prompt, I've found it to be even easier on Linux machines, since you don't NEED to find the bzfs executable. If you have it installed, it's already in your "path" meaning that you just have to type in a terminal/console/shell:

Code: Select all

bzfs -conf /path/to/config/file
rather than

Code: Select all

cd C:\Program Files\bzflag2.*.*\
bzfs.exe -conf /path/to/config/file
since your Command line interface already "knows" where bzfs is. Having worked with both, the standard BASH shell is much, much easier to work with than a DOS shell.

If you've been using some sort of GUI based program to run bzfs, yeah, it'll be a bit of a learning experience, but it's definitely basic stuff. Don't be discouraged, you'll pick it up.

If you want to get started, the command for installing bzfs is:

Code: Select all

sudo apt-get install bzflag-server
Honestly, if you're just wanting to get your feet wet, or play over a LAN, that's the easiest method. If you're running a full-time public server, you'll want to compile, since there've been a few security fixes that may have not made it to Ubuntu's repositories yet.

If you want to delve deeper into bzfs, and actually compile it from scratch, make it easy on yourself, and use:

Code: Select all

sudo apt-get build-dep bzflag-server
That will pull in all the *-dev packages you'll need to compile bzfs. That way, you can get right to the

Code: Select all

./configure --enable-shared
make
make install
part without having to hunt down all the SDL and CURL dependencies.

One more tip, learn to use the "man" (manual) pages. Assuming you've installed bzflag-server, all you have to do is type

Code: Select all

man bzfs
in a console, and you'll be given an instruction manual to read through. The man trick works for most programs that run on Linux.
User avatar
big_daddy2
Private First Class
Private First Class
Posts: 131
Joined: Sat May 06, 2006 1:06 am
Location: the middle of nowhere, USA

Post by big_daddy2 »

thx longhair :D

tried that page donny, not much help to me :(

one more thing tho, is there any thing in ubuntu that is like a windows batch file for rotation?

you know with a list of the configs and a restart command
Longhair
Private First Class
Private First Class
Posts: 330
Joined: Tue Feb 08, 2005 6:06 pm
Location: Lancaster, PA
Contact:

Post by Longhair »

one more thing tho, is there any thing in ubuntu that is like a windows batch file for rotation?

you know with a list of the configs and a restart command
Yeah, there's batch files in Linux, though we usually call them 'shell scripts'.

Have a look at the wiki for a rotation script:
http://my.bzflag.org/w/Rotating_Maps
User avatar
big_daddy2
Private First Class
Private First Class
Posts: 131
Joined: Sat May 06, 2006 1:06 am
Location: the middle of nowhere, USA

Post by big_daddy2 »

this all helps and all but..i cant seem to get my server public like i did on windows...idk if its a firewall or what but ill find out
anomaly
Private First Class
Private First Class
Posts: 220
Joined: Tue Jul 26, 2005 10:32 pm
Location: Gainesville Florida

Post by anomaly »

ubuntu does not run a firewall by default, If you don't have any services running and you are behind a router you really don't need a firewall. The average GNU/Linux home user that is. Routers usually have their own firewall. Sounds like you already have had a server running but if not check your router, you may need to port forward, or open, the bzfs port you intend to use. If you still have problems, try posting the output from your terminal after adding a '-d' or two to the bzfs command line.
User avatar
Cobra_Fast
Dev Monkey
Dev Monkey
Posts: 322
Joined: Sat Oct 07, 2006 11:51 am
Location: Germany
Contact:

Post by Cobra_Fast »

on ubuntu there is a very easy way to create a public server:

for those with root password:

Code: Select all

$ su -
# apt-get install bzflag-server
for those without root password:

Code: Select all

$ sudo apt-get install bzflag-server
then work on without root persmissions.
you may create a mapfile or download one, in my examples we call the mapfile "mapfile.bzw" (sure this can be everything else...)

Code: Select all

$ bzfs -world mapfile.bzw -j +r -ms 3 -public "Yeah I created a server"
This will start a public bzflag server (shown in list) with three shots (-ms 3), ricochet (+r) and jumping (-j).
-world mapfile.bzw loads the desired map.
-public "description" makes the server public and show up in lists. Here it will appear as "Yeah I created a server".

Default port for bzfs is 5154, so you connect to port 5154 with your game-client.
if you want to specify another port use -p PORT
Example:

Code: Select all

$ bzfs -world mapfile.bzw -j +r -ms 3 -public "Yeah I created a server" -p 1234
this will run our example game on port 1234

for exact description of command line options look at http://my.bzflag.org/w/BZFS_Command_Line_Options[/code]
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Post by joevano »

I would ALWAYS recommend running a public bzflag server in a chroot jail if using linux.

http://my.bzflag.org/w/BZFS_in_a_chroot_jail
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
Post Reply