How to Install Plex Media Server on Funtoo Linux

If you haven’t heard of Plex Media Server I would highly recommend taking a look at it.  Plex is a fully featured media server that provides content streaming to clients across a wired or wireless network.  Plex is supported on several different platforms including Windows, Mac, Linux, and Android.  You can also stream media to embedded devices such as the Roku.

Currently there isn’t an official ebuild for PMC but there is an unofficial build maintained by megacoffee.net that works quite well.  I tested this installation process on an amd64 build of Funtoo but it should work fine on i386 as well

Installing Layman

The first step is to install Layman with support for mercurial.  Layman is a package that provides a system for easily installing and updating portage overlays.  Mercurial is basically just a revision control system for software development, similar to Git.

You can add mercurial to your list of use flags in /etc/make.conf, or add it as a package specific use flag for layman.

echo app-portage/layman mercurial >>/etc/portage/package.use

Then emerge the Layman package

emerge layman

Configuring Layman

Since the Megacoffee.net overlay isn’t part of the official layman repository list yet we must edit the Layman config file and add it manually.

nano -w /etc/layman/layman.cfg

Under the overlays section add the Megacoffee repository url (http://gentoo-overlay.megacoffee.net/repositories.xml).

After you’ve saved the changes to the config file you must instruct Layman to fetch the list of repositories.

layman -f 

Once the list of repositories has been updated you can add the Megacoffee overlay to your system.

layman -a megacoffee

Editing Make.Conf

Next you must make portage aware of the Layman overlays, to do this simply add the source line below to your /etc/make.conf file.  Source must be in all lowercase otherwise portage will complain about a syntax error in the file.

source /var/lib/layman/make.conf

You’ll also need to add the following USE flags to your system in order for all of the package dependenaces to be propertly installed

USE='gtk utils X'

Installing the Package

At this point your finally ready to emerge Plex into your system.  If portage can’t find the package go back through the previous steps and check for any mistakes.  Since the package isn’t part of the standard portage tree you will not see it without the overlay.

Plex has quite a few dependencies so the installation will take some time to complete.

This is a great point to stop have have a cup of coffee while you wait!

emerge plex-media-server

Starting the Plex Server

Plex doesn’t require any initial configuration before the server can be started, everything can be done from the web interface.  Personally I think more developers should follow this example.  I’d much rather change configuration settings from a nice pretty web interface instead of mucking around with text files.

You can start, stop, or check the status of the service with the following init script.

/etc/init.d/plex-media-server start

I also like to configure the media server to start automatically on boot.

rc-update add plex-media-server default

Accessing the Web Interface

Assuming the service started without any errors you should now be able to access the web interface.  The management web server runs on port 32400.

http://<ip-address>:32400/manage

You should see the Plex media manager displayed in your browser.  If you don’t see it check to make sure the plex-media-server service successfully started.

Checking for Package Updates

Checking for updates for Plex is a two step process.  First synchronize the portage overlay on your system.

layman -S

Then use portage to see if an update is available.

emerge -p plex-media-server

What’s Next?

Once everything is up and running you can set up libraries within Plex to store movies, music, tv shows and whatever other media you may want to stream.  If your media server doesn’t have much local storage space available you might want to consider creating a central storage system using FreeNAS.

 

Thanks to the guys at Megacoffee for creating and maintaining the ebuild for Plex!

 

Sam Kear

Sam graduated from the University of Missouri - Kansas City with a bachelors degree in Information Technology. Currently he works as a network analyst for an algorithmic trading firm. Sam enjoys the challenge of troubleshooting complex problems and is constantly experimenting with new technologies.

Leave a Reply

Your email address will not be published. Required fields are marked *