Results 1 to 2 of 2

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

  1. #1
    Passenger
    Join Date
    Feb 2019
    Location
    Roskilde, Greater Copenhagen, Denmark
    Posts
    20

    Post 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
    wget https://repo-feed.flightradar24.com/...-latest.img.gz
    wget https://repo-feed.flightradar24.com/...18-5_amd64.tgz
    git clone https://github.com/mutability/dump1090.git
    git clone git://git.osmocom.org/rtl-sdr.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
    cmake ../ -DINSTALL_UDEV_RULES=ON -DLIB_INSTALL_DIR=/usr/lib64 -DCMAKE_INSTALL_PREFIX=/usr
    make
    sudo make install
    sudo ldconfig
    cd ../..

    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 = 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/install_dump1090.sh <== 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/create_missing_directories.sh
    chcon -u system_u -r object_r -t httpd_sys_content_t /run/dump1090-mutability
    EOF

    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/
    Last edited by erpomik; 2019-05-30 at 17:33. Reason: Typo i vi instructions

  2. #2
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,876

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •