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.
== 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/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/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
Exit from super user mode
exit
== 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/