Install Plex Media Server on Rocky Linux 9
In this tutorial, we will show you how to install Plex Media Server on Rocky Linux 9. For those of you who didn’t know, Plex is a free, open-source, and full-featured media server that allows you to stream your photos, video, and audio files on your PC, tablet or phone from anywhere. The software organizes your files and content into categories, making it easy to find and use. In addition, the Plex Media Server provides security and privacy features that allow you to control who can access your content and when.
Step 1. The first step is to update your system to the latest version of the package list. To do so, run the following commands:
sudo dnf check-update sudo dnf install dnf-utils
Step 2. Installing Plex Media Server on Rocky Linux 9.
By default, the Plex is not available on Rocky Linux 9 base repository. Now run the following command below to add the Plex repository to your Rocky Linux system:
sudo tee /etc/yum.repos.d/plexmedia.repo<<EOF [Plex] name=Plex baseurl=https://downloads.plex.tv/repo/rpm/\$basearch/ enabled=1 gpgkey=https://downloads.plex.tv/plex-keys/PlexSign.key gpgcheck=1 EOF
After the repository is enabled, now install the latest version of Plex Media Server using the below command:
sudo dnf install plexmediaserver
Step 3. While the default security policy might refuse SHA-1 all over the system, the problem we’re addressing today looks like this:
# dnf install package-name -y Dependencies resolved. ============================================================= Package Arch Version Repository Size ============================================================= Installing: package-name x86_64 1-1.el9 repoName 3.0 k Transaction Summary ============================================================= Install 1 Package Total size: 3.0 k Installed size: 21 Downloading Packages: [SKIPPED] package-name-1-1.el9.x86_64.rpm: Already downloaded warning: Signature not supported. Hash algorithm SHA1 not available. Problem opening package package-name-1-1.el9.x86_64.rpm The downloaded packages were saved in cache until the next successful transaction. You can remove cached packages by executing 'dnf clean packages'. Error: GPG check FAILED
This is discouraged. Even a signature from a years old RPM could be hacked recently by an attacker. If you really know what you are doing, there’s a possibility to use dnf –nogpgcheck option.
Alternatively you can also switch to the legacy crypto policy:
update-crypto-policies --set LEGACY
Or explicitly allow the SHA-1:
update-crypto-policies --set DEFAULT:SHA1
But please don’t forget to switch back, e.g.:
update-crypto-policies –set DEFAULT
Now you know how to install SHA-1 signed packages (when really necessary and you understand the security consequences). But please don’t forget to report to your software provider that the SHA-1 problem exists!
From the other side, administrators, please fix your infrastructure. Make the SW distribution chain fluent again. Then forget about this post.
Once the installation is completed, start the Plex media service and enable it to start after the system reboot with the following command:
sudo systemctl enable plexmediaserver
sudo systemctl start plexmediaserver
sudo systemctl status plexmediaserver
Disable the Firewall on Rocky Linux 9
You can stop the firewalld service on the Rocky Linux server using any of the following commands:
sudo systemctl stop firewalld.service
sudo service firewalld stop
sudo systemctl stop firewalld
After stopping the firewalld service, you will see that its services become inactive in the status information.
Once you disable the firewall, you must manually enable or restart the system.
In some cases, the security groups manage the firewall. In this situation, a firewall is not required on a host. Hence, you can permanently disable the firewalld service through the following command:
sudo systemctl disable firewalld
To prevent the firewalld services from the firewalld-bus interface or any other service from running, you can mask its services with the following command:
sudo systemctl mask firewalld
Now, your Firewall Daemon service is masked; you cannot enable it unless its services are unmasked. Masking the firewalld services means that no other service or process has the privilege to enable your firewall.