Update: Configuration for dump1090 status page added. Comments added.
Update: Changed a few instructions for Debian users.
Update: Moved from dump1090-mutability to dump1090-fa.
My Story:
As for many others, my interest in tracking flights started out as a "what is it, flying over my head?". After a couple of years subscribing to the Flightradar24 service, I came across the "Build your own ADS-B receiver" article and decided to order a dongle and antenna.
Being a system operator in a midsize company for many years, I have seen too many problems running long term services on the Raspberry Pi due to malfunctioning SD cards caused by the limited number of write operations allowed on this type of storage. The only right solution for me, was to run the feeder on a virtual Linux on my home VMware server. But soon the struggles began to show, as no-one seems to run ADS-B receivers on anything but ARM platforms. So - For anyone out there wanting to run fr24feed on a 64-bit Intel-based Linux, I have made the compact how-to guide below. It is not meant to be a detailed step-by-step guide with a lot of explanations, but as a quick-guide for the experienced Linux operator needing a hint or two.
My Hardware:
How I did it:
== Preparing a mint Ubuntu Server (18.04 LTS) ==
Install packages needed
sudo apt install build-essential git rtl-sdr librtlsdr-dev libbladerf-dev libncurses5-dev libncursesw5-dev pkg-config nginx
Download software from Flightradar24 and GitHub
wget https://repo-feed.flightradar24.com/rpi_images/fr24-raspberry-pi-latest.img.gz
wget https://repo-feed.flightradar24.com/linux_x86_64_binaries/fr24feed_1.0.18-5_amd64.tgz
git clone https://github.com/flightaware/dump1090
Unpack the software we have downloaded
gunzip --keep fr24-raspberry-pi-latest.img.gz
tar xzf fr24feed_1.0.18-5_amd64.tgz
Compile dump1090
cd dump1090
make
cd ..
== Configuring the feeder ==
Switch to super user mode
sudo su
Create the users and groups we need for running the software (Change GIDs and UIDs as needed)
groupadd -g 1992 fr24
useradd -g fr24 -u 1992 fr24 -d /home/fr24 -m -s /bin/bash
groupadd -g 1993 dump1090
useradd -g dump1090 -u 1993 dump1090 -d /home/dump1090 -m -s /bin/bash
Create a mount point for the Raspberry Pi image
mkdir ./fr24
List the contents of the Raspberry Pi image
fdisk --list fr24-raspberry-pi-latest.img
Mount the Raspberry Pi image using starting point of img2 multiplied with unit size for offset
mount --options loop,offset=50331648 fr24-raspberry-pi-latest.img ./fr24
Copy stuff from the Raspberry Pi image
cp ./fr24/etc/fr24feed.ini /etc/fr24feed.ini
cp ./fr24/etc/default/dump1090-mutability /etc/default/dump1090-mutability
cp ./fr24/etc/logrotate.d/dump1090-mutability /etc/logrotate.d/dump1090-mutability
cp ./fr24/etc/logrotate.d/fr24feed /etc/logrotate.d/fr24feed
cp ./fr24/etc/systemd/system/fr24feed.service /etc/systemd/system/fr24feed.service
cp -n ./fr24/etc/udev/rules.d/rtl-sdr.rules /etc/udev/rules.d/rtl-sdr.rules
cp ./fr24/usr/bin/fr24feed-status /usr/bin/fr24feed-status
mkdir -p /usr/share/doc/dump1090-mutability
cp -R ./fr24/usr/share/doc/dump1090-mutability/* /usr/share/doc/dump1090-mutability
mkdir -p /usr/lib/fr24/public_html/coolclock
cp -R ./fr24/usr/lib/fr24/* /usr/lib/fr24
mkdir -p /usr/share/fr24/licences
cp -R ./fr24/usr/share/fr24/* /usr/share/fr24
Unmount the Raspberry Pi image
umount ./fr24
Copy fr24feed and dump1090
cp ./fr24feed_amd64/fr24feed /usr/bin/fr24feed
cp ./dump1090/dump1090 /usr/bin/dump1090-mutability
cp ./dump1090/view1090 /usr/bin/view1090-mutability
mkdir -p /usr/share/dump1090-mutability/html
cp -R ./dump1090/public_html/* /usr/share/dump1090-mutability/html
Add dump1090 config the server section of nginx default site
vi /etc/nginx/sites-available/default
In vi, do this:
Position the cursor on the line before the closing bracket of the server block
Insert these lines
Press ':wq' to save and exit vi
Edit the fr24feed service
vi /etc/systemd/system/fr24feed.service
ExecStartPre=-/usr/lib/fr24/install_dump1090.sh <== Remove this line (just to be safe)
Blacklist the default driver that is automatically loaded for using the dongle as a TV device (Important: remove leading blanks)
cat <<EOF >>/etc/modprobe.d/blacklist-rtl.conf
blacklist dvb_usb_rtl28xxu
EOF
Reboot the system
reboot now
== Wrapping it all up ==
Signup for feeding (if you are not already signed up)
sudo fr24feed --signup
Edit the fr24feed configuration
sudo vi /etc/fr24feed.ini
procargs="--gain -10 --write-json /run/dump1090-mutability/ --lat YY.yyyy --lon XX.xxxx"
logpath="/var/log/fr24feed"
fr24key="xxxxxxxxxxxxxxxx"
Edit the dump1090 configuration
sudo vi /etc/default/dump1090-mutability
LAT="YY.yyyy"
LON="XX.xxxx"
Enable and start the fr24feed service
sudo systemctl enable fr24feed.service
sudo systemctl start fr24feed.service
Restart the nginx service
sudo systemctl restart nginx.service
== Checking the feeder status ==
Check status of the feeder
fr24feed-status
Check status of services
sudo systemctl status fr24feed.service
sudo systemctl status nginx.service
Check status from remote
http://mylinux.mydomain.com:8754/
http://mylinux.mydomain.com/dump1090/
Update: Changed a few instructions for Debian users.
Update: Moved from dump1090-mutability to dump1090-fa.
My Story:
As for many others, my interest in tracking flights started out as a "what is it, flying over my head?". After a couple of years subscribing to the Flightradar24 service, I came across the "Build your own ADS-B receiver" article and decided to order a dongle and antenna.
Being a system operator in a midsize company for many years, I have seen too many problems running long term services on the Raspberry Pi due to malfunctioning SD cards caused by the limited number of write operations allowed on this type of storage. The only right solution for me, was to run the feeder on a virtual Linux on my home VMware server. But soon the struggles began to show, as no-one seems to run ADS-B receivers on anything but ARM platforms. So - For anyone out there wanting to run fr24feed on a 64-bit Intel-based Linux, I have made the compact how-to guide below. It is not meant to be a detailed step-by-step guide with a lot of explanations, but as a quick-guide for the experienced Linux operator needing a hint or two.
My Hardware:
Receiver | RTL-SDR R820T2 TCXO Dongle |
Antenna | A3 ADS-B Antenna (1090 MHz) |
Computer | Intel® NUC Kit NUC6i7KYK (Skull Canyon) |
Hypervisor | VMware ESXi 6.7 |
OS | Ubuntu 18.04.2 LTS Server |
How I did it:
== Preparing a mint Ubuntu Server (18.04 LTS) ==
Install packages needed
sudo apt install build-essential git rtl-sdr librtlsdr-dev libbladerf-dev libncurses5-dev libncursesw5-dev pkg-config nginx
Download software from Flightradar24 and GitHub
wget https://repo-feed.flightradar24.com/rpi_images/fr24-raspberry-pi-latest.img.gz
wget https://repo-feed.flightradar24.com/linux_x86_64_binaries/fr24feed_1.0.18-5_amd64.tgz
git clone https://github.com/flightaware/dump1090
Unpack the software we have downloaded
gunzip --keep fr24-raspberry-pi-latest.img.gz
tar xzf fr24feed_1.0.18-5_amd64.tgz
Compile dump1090
cd dump1090
make
cd ..
== Configuring the feeder ==
Switch to super user mode
sudo su
Create the users and groups we need for running the software (Change GIDs and UIDs as needed)
groupadd -g 1992 fr24
useradd -g fr24 -u 1992 fr24 -d /home/fr24 -m -s /bin/bash
groupadd -g 1993 dump1090
useradd -g dump1090 -u 1993 dump1090 -d /home/dump1090 -m -s /bin/bash
Create a mount point for the Raspberry Pi image
mkdir ./fr24
List the contents of the Raspberry Pi image
fdisk --list fr24-raspberry-pi-latest.img
Code:
Disk fr24-raspberry-pi-latest.img: 1.8 GiB, 1866465280 bytes, 3645440 sectors Units: sectors of 1 * 512 = [COLOR="#FF0000"][B]512[/B][/COLOR] bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xee25660b Device Boot Start End Sectors Size Id Type fr24-raspberry-pi-latest.img1 8192 97889 89698 43.8M c W95 FAT32 (LBA) fr24-raspberry-pi-latest.img2 [COLOR="#FF0000"][B]98304[/B][/COLOR] 3645439 3547136 1.7G 83 Linux
mount --options loop,offset=50331648 fr24-raspberry-pi-latest.img ./fr24
Copy stuff from the Raspberry Pi image
cp ./fr24/etc/fr24feed.ini /etc/fr24feed.ini
cp ./fr24/etc/default/dump1090-mutability /etc/default/dump1090-mutability
cp ./fr24/etc/logrotate.d/dump1090-mutability /etc/logrotate.d/dump1090-mutability
cp ./fr24/etc/logrotate.d/fr24feed /etc/logrotate.d/fr24feed
cp ./fr24/etc/systemd/system/fr24feed.service /etc/systemd/system/fr24feed.service
cp -n ./fr24/etc/udev/rules.d/rtl-sdr.rules /etc/udev/rules.d/rtl-sdr.rules
cp ./fr24/usr/bin/fr24feed-status /usr/bin/fr24feed-status
mkdir -p /usr/share/doc/dump1090-mutability
cp -R ./fr24/usr/share/doc/dump1090-mutability/* /usr/share/doc/dump1090-mutability
mkdir -p /usr/lib/fr24/public_html/coolclock
cp -R ./fr24/usr/lib/fr24/* /usr/lib/fr24
mkdir -p /usr/share/fr24/licences
cp -R ./fr24/usr/share/fr24/* /usr/share/fr24
Unmount the Raspberry Pi image
umount ./fr24
Copy fr24feed and dump1090
cp ./fr24feed_amd64/fr24feed /usr/bin/fr24feed
cp ./dump1090/dump1090 /usr/bin/dump1090-mutability
cp ./dump1090/view1090 /usr/bin/view1090-mutability
mkdir -p /usr/share/dump1090-mutability/html
cp -R ./dump1090/public_html/* /usr/share/dump1090-mutability/html
Add dump1090 config the server section of nginx default site
vi /etc/nginx/sites-available/default
In vi, do this:
Position the cursor on the line before the closing bracket of the server block
Insert these lines
Code:
# rewrite ^/dump1090/$ /dump1090/gmap.html permanent; # rewrite ^/dump1090$ /dump1090/gmap.html permanent; location /dump1090/ { alias /usr/share/dump1090-mutability/html/; } location /dump1090/data/ { alias /run/dump1090-mutability/; }
Edit the fr24feed service
vi /etc/systemd/system/fr24feed.service
ExecStartPre=-/usr/lib/fr24/install_dump1090.sh <== Remove this line (just to be safe)
Blacklist the default driver that is automatically loaded for using the dongle as a TV device (Important: remove leading blanks)
cat <<EOF >>/etc/modprobe.d/blacklist-rtl.conf
blacklist dvb_usb_rtl28xxu
EOF
Reboot the system
reboot now
== Wrapping it all up ==
Signup for feeding (if you are not already signed up)
sudo fr24feed --signup
Edit the fr24feed configuration
sudo vi /etc/fr24feed.ini
procargs="--gain -10 --write-json /run/dump1090-mutability/ --lat YY.yyyy --lon XX.xxxx"
logpath="/var/log/fr24feed"
fr24key="xxxxxxxxxxxxxxxx"
Edit the dump1090 configuration
sudo vi /etc/default/dump1090-mutability
LAT="YY.yyyy"
LON="XX.xxxx"
Enable and start the fr24feed service
sudo systemctl enable fr24feed.service
sudo systemctl start fr24feed.service
Restart the nginx service
sudo systemctl restart nginx.service
== Checking the feeder status ==
Check status of the feeder
fr24feed-status
Check status of services
sudo systemctl status fr24feed.service
sudo systemctl status nginx.service
Check status from remote
http://mylinux.mydomain.com:8754/
http://mylinux.mydomain.com/dump1090/
Comment