Howto:Set up a multiplayer server on FreeBSD
Jump to navigation
Jump to search
FlightGear Multiplayer did not build directly on FreeBSD without a couple of modifications. Below are the steps to build the lastest *nix release (v0.11.0 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 and create a build directory
git clone git://gitorious.org/fgms/fgms-0-x.git mkdir fgms-build cd fgms-build/
Modifications
- I received 2 error when compiling fgms-0-x/src/server/fg_util.cxx because integer constants were too large so just convert them to real.
The commands below will automatically make the above modifications.
sed -i '' -e "s|1125899906842624)|1125899906842624.)|" ../fgms-0-x/src/server/fg_util.cxx sed -i '' -e "s|1099511627776)|1099511627776.)|" ../fgms-0-x/src/server/fg_util.cxx
Building
cmake ../fgms-0-x cmake --build . 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 05.07.2013 18:16:38 # This is newmpserver 05.07.2013 18:16:38 # FlightGear Multiplayer Server v0.11.0 started 05.07.2013 18:16:38 # using protocol version v1.1 (LazyRelay enabled) 05.07.2013 18:16:38 # listening to port 5000 05.07.2013 18:16:38 # telnet port 5001 05.07.2013 18:16:38 # admin port 5002 05.07.2013 18:16:38 # using logfile /var/log/fgms.log 05.07.2013 18:16:38 # listening on 64. 05.07.2013 18:16:38 # tracking is disabled. 05.07.2013 18:16:38 # I have 1 relays 05.07.2013 18:16:38 # relay mpserver14.flightgear.org:5000 05.07.2013 18:16:38 # I have 0 crossfeeds 05.07.2013 18:16:38 # I have 2 blacklisted IPs 05.07.2013 18:16:38 # Files: exit=[/tmp/fgms_exit] stat=[/tmp/fgms_stat]