Howto:Set up a multiplayer server on FreeBSD: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
mNo edit summary
(→‎Download: Switched from the master {{repo link}} template to the {{gitlab clone}} subtemplate.)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
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.
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 http://wiki.flightgear.org/Howto:Set_up_a_multiplayer_server
For generic setup information see [[Howto:Set up a multiplayer server]]
== Download ==
== Download ==
If you do not have git installed you must install it first
If you do not have git installed you must install it first
Line 7: Line 7:
make install clean
make install clean
</pre>
</pre>
Download the latest version of fgms and create a build directory
Download the latest version of fgms
{{#tag:syntaxhighlight
| {{gitlab clone|proj=fgms|repo=fgms-0-x}}
| lang = "sh"
}}
 
== Building ==
<pre>
<pre>
git clone git://gitorious.org/fgms/fgms-0-x.git
mkdir fgms-build
mkdir fgms-build
cd fgms-build/
cd fgms-build/
</pre>
== Modifications ==
*I received two errors when building.  malloc.h appears to be depreciated on FreeBSD and is replaced another already included source file so just comment it out.
*Also I received compile error on one file because integer constants were to large so just convert them to real.
The commands below will automatically make the above modifications.
<pre>
sed -i '' -e "s|#include <malloc.h>|//#include <malloc.h>|" ../fgms-0-x/src/libcli/libcli.cxx
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
</pre>
== Building ==
<pre>
cmake ../fgms-0-x
cmake ../fgms-0-x
cmake --build .
make install
make install
cp -n ../fgms-0-x/contrib/etc/fgms_production.skel.conf /etc/fgms.conf
cp -n ../fgms-0-x/contrib/etc/fgms_production.skel.conf /etc/fgms.conf
</pre>
</pre>
== Configuring ==
== Configuring ==
Make sure you edit the installed configuration file /etc/fgms.conf
Make sure you edit the installed configuration file /etc/fgms.conf
Shown below are the lines I changed in /etc/fgms.conf
Shown below are the lines with comments in my /etc/fgms.conf:
<pre>
<pre>
server.name = newmpserver
server.name = mpserverNN
server.address = 64.69.45.88
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
server.logfile = /var/log/fgms.log
# mpserver01 does this
server.tracked = false
server.daemon = true
server.daemon = true
#relay.host = mpserver01.flightgear.org
# This only needed for one server on the network
#relay.port = 5000
server.is_hub = false
server.out_of_reach = 10000
# 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
</pre>
</pre>
== Running ==
== Running ==
<pre>
<pre>
fgms -c /etc/fgms.conf
$ fgms -c /etc/fgms.conf
processing /etc/fgms.conf
processing /etc/fgms.conf
# using logfile /var/log/fgms.log
# using logfile /var/log/fgms.log
05.07.2013 18:16:38 # This is newmpserver
10.07.2013 15:26:43 # This is mpserver02
05.07.2013 18:16:38 # FlightGear Multiplayer Server v0.11.0 started
10.07.2013 15:26:43 # FlightGear Multiplayer Server v0.11.1 started
05.07.2013 18:16:38 # using protocol version v1.1 (LazyRelay enabled)
10.07.2013 15:26:43 # using protocol version v1.1 (LazyRelay enabled)
05.07.2013 18:16:38 # listening to port 5000
10.07.2013 15:26:43 # listening to port 5000
05.07.2013 18:16:38 # telnet port 5001
10.07.2013 15:26:43 # telnet port 5001
05.07.2013 18:16:38 # admin port 5002
10.07.2013 15:26:43 # admin port x002
05.07.2013 18:16:38 # using logfile /var/log/fgms.log
10.07.2013 15:26:43 # using logfile /var/log/fgms.log
05.07.2013 18:16:38 # listening on 64.
10.07.2013 15:26:43 # listening on 64.69.45.88
05.07.2013 18:16:38 # tracking is disabled.
10.07.2013 15:26:43 # tracking is disabled.
05.07.2013 18:16:38 # I have 1 relays
10.07.2013 15:26:43 # I have 1 relays
05.07.2013 18:16:38 # relay mpserver14.flightgear.org:5000
10.07.2013 15:26:43 # relay mpserver01.flightgear.org:5000
05.07.2013 18:16:38 # I have 0 crossfeeds
10.07.2013 15:26:43 # I have 0 crossfeeds
05.07.2013 18:16:38 # I have 2 blacklisted IPs
10.07.2013 15:26:43 # I have 2 blacklisted IPs
05.07.2013 18:16:38 # Files: exit=[/tmp/fgms_exit] stat=[/tmp/fgms_stat]
10.07.2013 15:26:43 # Files: exit=[/tmp/fgms_exit] stat=[/tmp/fgms_stat]
</pre>
</pre>
[[Category:Multiplayer]]

Latest revision as of 10:25, 24 May 2016

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]