Howto:Set up a multiplayer server on FreeBSD

From FlightGear wiki
Jump to navigation Jump to search

FlightGear Multiplayer will build directly on FreeBSD. Below are the steps to build the lastest *nix release (v0.11.1 as of July 2013) on FreeBSD 9.0-STABLE. For generic setup information see Howto:Set up a multiplayer server

Download

If you do not have git installed you must install it first

cd /usr/ports/devel/git
make install clean

Download the latest version of fgms

 git clone https://gitlab.com/fgms/fgms-0-x.git

Building

mkdir fgms-build
cd fgms-build/
cmake ../fgms-0-x
make install
cp -n ../fgms-0-x/contrib/etc/fgms_production.skel.conf /etc/fgms.conf

Configuring

Make sure you edit the installed configuration file /etc/fgms.conf Shown below are the lines with comments in my /etc/fgms.conf:

server.name = mpserverNN
server.port = 5000

server.telnet_port = 5001
server.admin_port = 5002
server.admin_user = xxxx
server.admin_pass = xxxx
server.admin_enable = xxxx
server.logfile = /var/log/fgms.log
# mpserver01 does this
server.tracked = false
server.daemon = true
# This only needed for one server on the network
server.is_hub = false
# Distance from which server will allow FG pilots see each other
server.out_of_reach = 100
# You will need to contact the admin of mpserver01 and tell them this server now exists.
relay.host = mpserver01.flightgear.org
relay.port = 5000
# it's only interresting for fgms-developers
# crossfeed.host = foo.example.com

Running

$ fgms -c /etc/fgms.conf
processing /etc/fgms.conf
# using logfile /var/log/fgms.log
10.07.2013 15:26:43 # This is mpserver02
10.07.2013 15:26:43 # FlightGear Multiplayer Server v0.11.1 started
10.07.2013 15:26:43 # using protocol version v1.1 (LazyRelay enabled)
10.07.2013 15:26:43 # listening to port 5000
10.07.2013 15:26:43 # telnet port 5001
10.07.2013 15:26:43 # admin port x002
10.07.2013 15:26:43 # using logfile /var/log/fgms.log
10.07.2013 15:26:43 # listening on 64.69.45.88
10.07.2013 15:26:43 # tracking is disabled.
10.07.2013 15:26:43 # I have 1 relays
10.07.2013 15:26:43 # relay mpserver01.flightgear.org:5000
10.07.2013 15:26:43 # I have 0 crossfeeds
10.07.2013 15:26:43 # I have 2 blacklisted IPs
10.07.2013 15:26:43 # Files: exit=[/tmp/fgms_exit] stat=[/tmp/fgms_stat]