In this guide, you will learn to Install and Acess Plex Media Server on AlmaLinux. Plex Media Server is an organizational tool that allows you to access your all digital libraries such as music, photos, and videos from any computer or mobile device.
Plex can be run on most operating systems. Now follow the steps below to see Plex installation steps on AlmaLinux. You can use this Plex instruction on both AlmaLinux 8 and AlmaLinux 9.
Steps To Install Plex Media Server on Almalinux
To complete this guide, you must have access to your server as a non-root user with sudo privileges and set up a basic firewall. For this purpose, you can visit the following AlmaLinux initial server setup:
Also, you need a domain name that is pointed to your server’s IP address.
Now proceed to the following steps to start your Plex setup.
Step 1 – Download and Install Plex on AlmaLinux
First, you must run the system update with the command below:
sudo dnf update -y
sudo wget https://downloads.plex.tv/plex-media-server-new/22.214.171.12449-8f4248874/redhat/plexmediaserver-126.96.36.19949-8f4248874.x86_64.rpm
When your download is completed, use the command below to install your Plex media server:
sudo dnf install plexmediaserver-188.8.131.5249-8f4248874.x86_64.rpm
Step 2 – Enable and Start Plex Media Service on AlmaLinux
Now that your Plex installation is completed, you must start and enable your service. To do this, you can use the commands below:
# sudo systemctl enable plexmediaserver # sudo systemctl start plexmediaserver
Verify your Plex Media server is active and running on AlmaLinux:
sudo systemctl status plexmediaserver
Output ● plexmediaserver.service - Plex Media Server Loaded: loaded (/usr/lib/systemd/system/plexmediaserver.service; enabled; > Active: active (running) since Mon 2023-09-04 06:03:51 EDT; 3min 31s ago Main PID: 75468 (Plex Media Serv) Tasks: 111 (limit: 23609) Memory: 241.2M CPU: 46.370s CGroup: /system.slice/plexmediaserver.service ...
Step 3 – Configure Firewall For Plex Media Server
At this point, we assumed that you have a running firewall with firewalld. Now you must allow Plex service and port 80 through your firewall rules with the commands below:
# sudo firewall-cmd --add-service=plex --zone=public --permanent # sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
Reload the firewall to apply the new rules:
sudo firewall-cmd --reload
Step 4 – Configure Apache as a Reverse Proxy for Plex
At this point, we want to use Apache virtual host files to host the Plex media server. First, install Apache on AlmaLinux with the command below:
sudo dnf install httpd -y
Start and enable the Apache service with the following commands:
sudo systemctl enable --now httpd
Then, Allow HTTPD scripts and modules to connect to the network with the command below:
sudo setsebool -P httpd_can_network_connect on
At this point, create an Apache virtual host file with your desired text editor like vi editor:
sudo vi /etc/httpd/conf.d/plexmedia.conf
Add the following content to the file:
<VirtualHost *:80> ServerName example.com ErrorDocument 404 /404.html #HTTP proxy ProxyPreserveHost On ProxyPass / http://localhost:32400/ ProxyPassReverse / http://localhost:32400/ #Websocket proxy <Location /:/websockets/notifications> ProxyPass wss://localhost:32400/:/websockets/notifications ProxyPassReverse wss://localhost:32400/:/websockets/notifications </Location> </VirtualHost>
Remember to change your server name with your own domain name.
When you are done, save and close the file.
Check the Apache virtual host file for any syntax error:
Output Syntax OK
Next, reload Apache on AlmaLinux to apply the changes:
sudo systemctl reload httpd
Step 5 – Access and Set up Plex Media Server From Web Interface
At this point, you can access your Plex media server via the web interface by typing the following URL in your web browser:
You will see the Plex account sign-in. You will need to sign up with a valid e-mail address to use the service.
After you are done with the sign-up account, you will see the Plex media server dashboard.
From there you can easily access your digital items from any device. Also, you can perimum your Plex to access more features.
At this point, you have learned to Install Plex Media Server on Almalinux. You can do the installation steps by downloading the latest RPM package and configuring Apache as a reverse proxy for Plex, Finally, access your Plex via the web interface and complete your setup.
You use this guide for Plex installation for both RHEL 8 and RHEL 9.
Hope you enjoy using it. You may be interested in these articles from the AlmaLinux Tutorials: