No announcement yet.

How to set up a feeder using 64-bit RedHat Linux on Intel platform

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to set up a feeder using 64-bit RedHat Linux on Intel platform

    As a follow-up on "How to set up a feeder using 64-bit Ubuntu Linux on Intel platform", here is how to do on RedHat Enterprise Linux.

    Update 2019-05-30: Minor changes after RHEL 8.0 Final Release.

    == Preparing a mint RedHat Enterprise Linux (RHEL 8.0) ==

    Install packages needed
    sudo yum groupinstall 'Development Tools'
    sudo yum install cmake libusbx libusbx-devel nginx redhat-lsb-core wget

    Enable the nginx service
    sudo systemctl enable nginx.service

    Update firewall rules
    sudo firewall-cmd --zone=public --add-port=http/tcp --permanent
    sudo firewall-cmd --zone=public --add-port=https/tcp --permanent
    sudo firewall-cmd --zone=public --add-port=8754/tcp --permanent
    sudo firewall-cmd --reload
    sudo firewall-cmd --list-all --zone=public

    Download software from Flightradar24 and GitHub
    git clone
    git clone git://

    Unpack the software we have downloaded
    gunzip --keep fr24-raspberry-pi-latest.img.gz
    tar xzf fr24feed_1.0.18-5_amd64.tgz

    Compile rtl-sdr
    mkdir rtl-sdr/build
    cd rtl-sdr/build
    sudo make install
    sudo ldconfig
    cd ../..

    Compile dump1090
    cd dump1090
    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
        Disk fr24-raspberry-pi-latest.img: 1.8 GiB, 1866465280 bytes, 3645440 sectors
        Units: sectors of 1 * 512 = 512 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      98304 3645439 3547136  1.7G 83 Linux
    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

    Merge the server section from dump1090 into nginx default site
    vi -o ./dump1090/debian/nginx/dump1090-mutability /etc/nginx/nginx.conf

    In vi, do this:
    Position the cursor on the first line inside the server block
    Press 'V' (capital v) to mark the line
    Move cursor to last line inside the server block
    Press 'y' to yank the lines
    Press 'Ctrl+w' to switch window
    Position the cursor on the line with the closing bracket of the server block
    Press 'P' (capital p) to paste the lines
    Press ':wqa' to save and exit vi

    Edit the fr24feed service
    vi /etc/systemd/system/fr24feed.service
    ExecStartPre=-/usr/lib/fr24/ <== Remove this line (just to be safe)

    Give nginx access to the output directory from fr24feed (Important: remove leading blanks)
    cat <<EOF >>/usr/lib/fr24/
    chcon -u system_u -r object_r -t httpd_sys_content_t /run/dump1090-mutability

    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

    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"

    Edit the dump1090 configuration
    sudo vi /etc/default/dump1090-mutability

    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

    Check status of services
    sudo systemctl status fr24feed.service
    sudo systemctl status nginx.service

    Check status from remote
    Last edited by erpomik; 2019-05-30, 17:33. Reason: Typo i vi instructions

  • #2
    Well done ! asset.jpeg.jpgasset.jpeg.jpgasset.jpeg.jpg


    • #3
      dump1090 part needs some rework ... the given git repo is obsolte and they advise to use in stead. But make does not work.


      • #4
        (A) If you want to use dump1090-mutability, you have to use following command to clone the source code, otherwise you will get only one file, that is

        sudo git clone -b "unmaintained"
        (B) The Fedora is based on RHEL. Hence the procedures on Fedora should mostly be applicable to RHEL.

        On Fedora 31, I have built dump1090-fa from source code, then installed/configured it. The dump1090-fa works ok, but map displays warning "AJAX call failed. Unable to fetch data". It has something to do with permissions of data files (.json) in folder /run/dump1090-fa. I am trying to resolve it. If suceesful, will post the method. This is what I have done up to now:

        (1) Install dependencies and build tools

        sudo dnf install libusb-devel
        sudo dnf install ncurses-devel
        sudo dnf install make
        sudo dnf install cmake

        (2) Install librtlsdr (make will fail without it)
        Note: the package librtlsdr is not available in Fedora repository, and therefore I built it from source code as shown below.

        NOTE: The command starting with "sudo cmake ../" has 4 flags after it and is very long, and full command is not visible directly. Please scroll right to see and copy it in full.
        cd ~/
        git clone
        cd librtlsdr
        sudo mkdir build &amp;&amp; cd build
        sudo make
        sudo make install
        sudo ldconfig

        (3) Build dump1090-fa linux binary from source code.

        cd ~/
        sudo git clone dump1090-fa
        cd dump1090-fa
        sudo make BLADERF=no
        (4) Test the Linux Binary

        cd ~/dump1090-fa
        Wed Jan 22 13:24:29 2020 EST dump1090-fa starting up.
        rtlsdr: using device #0: Generic RTL2832U (Realtek, RTL2832UFA, SN 00000101)
        Detached kernel driver
        Found Rafael Micro R820T tuner
        rtlsdr: tuner gain set to 49.6 dB
        Allocating 4 zero-copy buffers
        CRC: 000000 RSSI: -1.8 dBFS Score: 750
        Time: 8929001.67us
        DF:11 AA:C01AA7 IID:0 CA:5
        All Call Reply (reliable)
        ICAO Address: C01AA7 (Mode S / ADS-B)
        Air/Ground: airborne

        (5) Configure &amp; enable systemd for dump1090-fa by copying necessay files from cloned source code.

        sudo cp ~/dump1090-fa/dump1090 /usr/bin/dump1090-fa
        sudo cp ~/dump1090-fa/debian/dump1090-fa.default /etc/default/dump1090-fa
        sudo cp ~/dump1090-fa/debian/dump1090-fa.service /usr/lib/systemd/system/dump1090-fa.service
        sudo mkdir -p /usr/share/dump1090-fa/
        sudo cp ~/dump1090-fa/debian/start-dump1090-fa /usr/share/dump1090-fa/start-dump1090-fa
        sudo cp -r ~/dump1090-fa/public_html /usr/share/dump1090-fa/html
        sudo useradd --system dump1090
        sudo systemctl enable dump1090-fa
        sudo systemctl start dump1090-fa
        sudo sustemctl status dump1090-fa
        (6) Install lighttpd web server and copy necessary dump1090-fa integration &amp; configuration file from source code.

        sudo dnf install lighttpd
        sudo cp ~/dump1090-fa/debian/lighttpd/89-dump1090-fa.conf /etc/lighttpd/conf.d/89-dump1090-fa.conf
        sudo chmod 666 /etc/lighttpd/lighttpd.conf
        echo "server.modules += ( \"mod_alias\" )" &gt;&gt; /etc/lighttpd/lighttpd.conf
        echo "include \"/etc/lighttpd/conf.d/89-dump1090-fa.conf\"" &gt;&gt; /etc/lighttpd/lighttpd.conf
        sudo chmod 644 /etc/lighttpd/lighttpd.conf
        sudo systemctl enable lighttpd
        sudo systemctl restart lighttpd

        Fedora32 - dump1090-fa.png


        • #5
          Whenever I edit my above post,the system declares it Spam and makes it invisible. I then have to delete it and recreate a new post.

          This has happened 3 times with my above post, just for minor editing. Stupidly over-active Spam Protection