Technology, Linux

Install Plex on CentOS

Previously, I ran Plex on a Windows 10 desktop PC that my wife and I shared with a 2 TB hard drive to hold my media.  I had quite the extensive DVD collection and had long since decided that digital was the way to go instead, and ripped them to the hard drive.  Imagine, manually changing discs like an animal!  Who even owns a DVD player anymore?  I had done the same with my CD collection, so had a sizable music stash as well.  With the advent of the new server, I decided to create a share folder for the media so I could take proper backups of it, and then run the Plex install in a CentOS 7 container.

I first created a folder named Plex on my file server and set read only permissions for all users.  I then created a service account for Plex to use to access the media.  I used this username/password combination in a credentials file to mount the share as described in this post.

With that out of the way, it was time to download/install Plex.  They have 32/64 bit packages available for Ubuntu, Fedora, and CentOS.  I downloaded the 64 bit CentOS package from here and then installed it with yum.

The package includes both SysVInit and Systemd scripts.  In my case with CentOS 7 I needed to issue the following commands to enable and then start the service:

After that, just load up a browser and point it to http://yourplexserver:32400 and go about configuring your various libraries.  That’s really all there is to it.  I wasn’t particularly invested in keeping my watched/unwatched counts or marking my place in various shows/movies I may have been watching so I didn’t bother to try and migrate my plex database over.  I just allowed it to go ahead and re-download all the meta data and manually configured my settings as it only takes a few minutes.

One thing I did find a bit troublesome was updating Plex on the server.  On the windows box, it was as simple as getting the banner stating there was a new version, going to server settings in the browser, and hitting download/install and it would download and execute the installer in the background.  No such functionality in Linux.  I was having to visit the Plex download page, get the link for the new package, download it with wget, run the yum install and then it wouldn’t restart itself afterwards so I would need to issue a systemctl start plexmediaserver.  Luckily, there is a better way.  I came across a handy script on github that will take care of all of this for you, written by MrWorf.  You can find it here.

There is even an install script written for it, simply execute this from the shell:

Run through the prompts and answer the various questions appropriately, and you are all set.  It will even pull the authentication token from your Plex server and use it to download PlexPass releases.  While it will handle all of this automatically, and can be setup with cron, I chose not to do this.  It doesn’t happen often, but I have had issues in the past where a Plex update caused an issue… I had to go nearly a week without it being functional on my Vizio SmartTV for instance.  So, I prefer to keep it a somewhat manual process, and wait to read the release notes and give it a few days to make sure I don’t see any related issues/bug reports.

I want to try and keep as much of my management centralized as possible, and I’m using Ansible as my weapon of choice for that, so I just created a simple playbook that will execute the update script for me.

 

Series Navigation<< Windows shares on LinuxUbiquiti UniFi Controller >>

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.