Changes

no edit summary
=Prereqs=
#Log in to your Debian 9 server as a user capable of running the "'''sudo" ''' command#Run "sudo adduser virtradar"#Run "Make sure your system is up to date by running <pre>sudo apt update"#Run "</pre> and <pre>sudo apt upgrade"</pre>#Run "Install the Apache Web Server and Mono Framework by running <pre>sudo apt install apache2 mono-complete"</pre>
#*Note: If you're setting this up on an [https://en.wikipedia.org/wiki/LXC LXC] container you'll get an error with ''avahi-daemon'' and ''libnss-mdns:amd64''. This is OK. For our uses, this won't cause any problems.
#Create a new user for running Virtual Radar Server by running <pre>sudo adduser virtradar</pre>
=Setup Apache2 HTML Forwards=
The following actions will allow your users to visit ''http://MYSERVER'' and ''http://MYSERVER/admin'' to visit the main site and the admin site (respectivleyrespectively).#Run "Delete Apache's default landing page by running <pre>sudo rm /var/www/html/index.html"</pre>#Run "Create a new landing page that forwards to the main VRS site by running <pre>sudo nano /var/www/html/index.html" </pre> and enter entering the following <nowikipre><head> &#10; <meta http-equiv="refresh" content="0; url=http://MYSERVER:8080/VirtualRadar" />&#10;</head></nowikipre>#Run "Create a new page to redirect to the VRS admin site by running <pre>sudo mkdir /var/www/html/admin"&#Run "10;sudo nano /var/www/html/admin/index.html" </pre> and enter the following <nowikipre><head> &#10; <meta http-equiv="refresh" content="0; url=http://MYSERVER:8080/VirtualRadar/WebAdmin" />&#10;</head></nowikipre>
=Setup pingStation=
These steps are specific to the uAvionix pingStation. Other ADS-B receivers will setup slightly differently.
#visit ''http://pingstation-abcd'' (where ''abcd'' are the last 4 digits of your pingStation's [https://en.wikipedia.org/wiki/MAC_address MAC Address]
#set '''Output Formats:''' to ''TCP Compressed VR''
#set '''TCP Push IP Address or Hostname:''' to ''MYSERVER''
=Install Virtual Radar Server=
#Run "Switch to the new virtradar user (starting in their home folder) by running <pre>su - virtradar"</pre>#Run "cd ~"#Run "Create a new directory for VRS, and move into it, by running <pre>mkdir VirtualRadar"&#Run "10;cd VirtualRadar"</pre>#Run "Download the latest copy of VRS by running <pre>wget http://www.virtualradarserver.co.uk/Files/Preview/V3/VirtualRadar.tar.gz"</pre>#Run "Extract the contents by running <pre>tar -xvzf VirtualRadar.tar.gz"</pre>#Run "Delete the compressed file by running <pre>rm VirtualRadar.tar.gz"</pre>#Run "Download the WebAdmin plugin by running <pre>wget http://www.virtualradarserver.co.uk/Files/Preview/V3/VirtualRadar.WebAdminPlugin.tar.gz"</pre>#Run "Extract the contents by running <pre>tar -xvzf VirtualRadar.WebAdminPlugin.tar.gz"</pre>#Run "Delete the compressed file by running <pre>rm VirtualRadar.WebAdminPlugin.tar.gz"</pre>#Run Start VRS and create an Admin User by running <pre>"mono /home/virtradar/VirtualRadar/VirtualRadar.exe -nogui -createAdmin:admin -password:PASSWORD"</pre>#*for subsequent runs use "<pre>mono VirtualRadar.exe -nogui"</pre>
=Configure Virtual Radar Server=
#Visit ''http://MYSERVER:8080/VirtualRadar/WebAdmin/Settings.html'' and login as ''admin/PASSWORD''
#Click '''Receivers'''
#Click the green '''Edit''' icon for ''Receiver''
=Target your Local OSM Tile Server=
#First you'll need to have a local Open Street Maps Tile Server. You can follow my [[Creating How to Setup an Open Street Map Tile Server under Ubuntu 18.04 in a Proxmox Container|How To]] to make your own. I'm going to assume that it is locally available at http://map.
#log in to your Virtual Radar Server
##Run ''Switch to the VRS user by running <pre>su - virtradar''</pre>##Run 'Create a custom TileServerSettings file to add your local Tile Server to VRS's drop down list by running <pre>nano /home/virtradar/.local/share/VirtualRadar/TileServerSettings-Custom.json'' </pre> and fill in the file with <nowikipre>[ &#10; { &#10; "MapProvider": "Leaflet", &#10; "DisplayOrder": 1, &#10; "Name": "Local OSM Tile Server", &#10; "Url": "http://map/osm/{z}/{x}/{y}.png", &#10; "Attribution": "http://map/", &#10; "Subdomains": null, &#10; "Version": null, &#10; "MinZoom": null, &#10; "MaxZoom": 19, &#10; "ZoomOffset": null, &#10; "MinNativeZoom": null, &#10; "MaxNativeZoom": null, &#10; "ZoomReverse": false, &#10; "DetectRetina": false, &#10; "ClassName": null, &#10; "ExpandoOptions": [],  &#10;&#10; /* New settings from version 2.4.5 onwards: */ &#10; "ErrorTileUrl": null, &#10; "IsTms": false, &#10; "IsLayer": false, &#10; "DefaultBrightness": 70, &#10; "DefaultOpacity": 100 &#10; }&#10;]</nowikipre>##and then save & exit##Run nano by hitting '''Ctrl+C''' and then '''Y'sudo systemctl restart virtualradar''##Start your VRS instance by running <pre>cd /home/virtradar/VirtualRadar&#10;mono VirtualRadar.exe -nogui</pre>#Visit ''http://MYSERVER:8080/VirtualRadar/WebAdmin/Settings.html'' and login as ''admin/PASSWORD''
##Click '''Options''' on the left
##Under '''Data Sources''' / '''Map Providers''' click the '''Tile server:''' drop down menu and select "'''* Local OSM Tile Server"'''
##Hit the '''Save''' button at the top
=Setup Debian 9 to start VirtualRadar on Boot=
#Get back to your ''sudo'' user by running "<pre>exit"</pre>#Run "Create a new systemd service file by running <pre>sudo nano /etc/systemd/system/virtualradar.service" </pre> and fill filling it in with <nowikipre>Description=Virtual Radar Server ADS-B Plotter &#10;&#10;Wants=network.target&#10;After=syslog.target network-online.target &#10;&#10;[Service]&#10;Type=simple&#10;ExecStart=/usr/bin/mono /home/virtradar/VirtualRadar/VirtualRadar.exe -nogui&#10;Restart=on-failure&#10;RestartSec=10&#10;KillMode=process&#10;User=virtradar&#10;Group=virtradar &#10;&#10;[Install]&#10;WantedBy=multi-user.target</nowikipre>#Run "Make sure systemd knows about your new file by running <pre>sudo systemctl daemon-reload"</pre>#Run "Enable your new service by running <pre>sudo systemctl enable virtualradar"</pre>#Run "Start VRS by running <pre>sudo systemctl start virtualradar"</pre>#Run "Check the status of the VRS service by running <pre>sudo systemctl status virtualradar" <pre>#Reboot your machine to check statusmake sure VRS starts on boot by running <pre>sudo reboot</pre> and visiting http://MYSERVER/
[[Category: Linux]]