Install Plex On CentOS

1 minute read

Description:

Follow these steps to install Plex on CentOS 7.

To Resolve:

  1. Go to Plex Downloads and get the latest installer for your OS, in this case CentOS 7:
sudo yum install plexmediaserver_0.9.8.18.290-11b7fdd_x86_64.rpm

# Start the service
sudo systemctl start plexmediaserver.service

# Set the service to run on startup
sudo systemctl enable plexmediaserver.service

# Open a firewall port for it
firewall-cmd --zone=public --add-port=32400/tcp --permanent

# If you set it to a different port (which is recommended), add it to the SEMANAGE exceptions
sudo semanage port -a -t http_port_t -p tcp (portNumber)

To Change the Plex User:

All of my media files are on a Samba share with permissions of 770, so I had to change Plex to access the share as my user:

# Stop the service
sudo systemctl stop plexmediaserver

# Add my user to the plex group
sudo usermod -a -G plex gerry

# Edit the config file that tells Plex which user to run as
sudo vi /etc/sysconfig/PlexMediaServer

# Change user to gerry
sudo chown -R gerry /var/lib/PlexMediaServer

# Change the user in the service config file
sudo vi /lib/systemd/system/plexmediaserver.service

# Reload the daemon
sudo systemctl daemon-reload

# Start the service again
sudo systemctl start plexmediaserver

To Update Plex:

# Download the update to your downloads and open a up a terminal
systemctl stop plexmediaserver
rpm -Uvh plexmediaserver-vXXXX
systemctl start plexmediaserver