Skip to content

Instantly share code, notes, and snippets.

@gubi
Last active August 29, 2015 14:16
Show Gist options
  • Save gubi/a555eb646d2f191476bf to your computer and use it in GitHub Desktop.
Save gubi/a555eb646d2f191476bf to your computer and use it in GitHub Desktop.
How to run Plex on Odroid U3 (Ubuntu OS)

How to run Plex on Odroid U3 (Ubuntu OS)

WARNING: This guide is deprecated

Follow this new one (for Ubuntu and Debian - General ODROID hardware): http://www.htpcguides.com/install-plex-media-server-on-odroid-lubuntu-and-debian/


  1. Download Plex from https://plex.tv/downloads, version Netgear ARM 6.x
  2. In the ODROID U3 create de dir apps on the root, or run this command:
$ sudo mkdir /apps
  1. On your pc, open the .deb file with the package manager and copy the entire content of the folder "apps" to the /apps directory on ODROID U3
  2. Create "MediaLibrary" and "temp" in /apps/plexmediaserver/ directory or run these commands:
$ sudo mkdir /apps/plexmediaserver/MediaLibrary
$ sudo mkdir /apps/plexmediaserver/temp
  1. Copy files reported below to the following paths:

Now you can start and stop Plex with

$ sudo service plexmediaserver start|stop

or

$ /etc/init.d/plexmediaserver start|status|stop
#!/bin/sh
### BEGIN INIT INFO
# Provides: plexmediaserver
# Required-Start: $remote_fs $syslog $networking
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Plex Media Server
# Description: Plex Media Server for Linux,
# More information at http://www.plexapp.com
# Many thanks to the great PlexApp team for their wonderfull job !
# Author: Cedric Quillevere / [email protected]
# Rewamped Christian Svedin / [email protected]
# Adapted (cubox-i) Francis Belnger / [email protected]
# Version: 1.2
### END INIT INFO
# Read configuration variable file if it is present
[ -r /etc/default/plexmediaserver_environment ] && . /etc/default/plexmediaserver_environment
# test -f "/usr/local/bin/plexmediaserver" || exit 0
plex_running=`ps ax | grep "Plex Media Server" | awk '{ print $1 }' | wc -l`
case "$1" in
start)
if [ "$plex_running" -gt 1 ]; then
echo "Plex already running..."
exit 0
fi
echo -n "Starting Plex Media Server: "
# su -l $PLEX_MEDIA_SERVER_USER -c "/apps/plexmediaserver/Binaries/plexmediaserver/start.sh &" >/dev/null 2>&1
su -c "/apps/plexmediaserver/Binaries/start.sh &" > /var/log/plexms.log 2>&1
sleep 1
echo "done"
;;
stop)
if [ "$plex_running" -eq 1 ]; then
echo "Plex Media Server is not running (no process found)..."
exit 0
fi
echo -n "Killing Plex Media Server: "
# Trying to kill the Plex Media Server itself but also the Plug-ins
ps ax | grep "Plex Media Server" | awk '{ print $1 }' | xargs kill -9 >/dev/null 2>&1
ps ax | grep "Plex DLNA Server" | awk '{ print $1 }' | xargs kill -9 >/dev/null 2>&1
sleep 1
echo "done"
;;
restart)
sh $0 stop
sh $0 start
;;
status)
if [ "$plex_running" -gt 1 ]; then
echo "Plex Media Server process running."
else
echo "It seems that Plex Media Server isn't running (no process found)."
fi
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
exit 0
# plexpms - service job file
description "Plex Media Server"
author "http://www.plexapp.com/"
# When to start the service
start on runlevel [2345]
# When to stop the service
stop on runlevel [016]
# Automatically restart process if crashed
respawn
# Sets nice and ionice level for job
nice -5
# What to execute
script
su -c /apps/plexmediaserver/Binaries/start.sh > /var/log/plexms.log 2>&1
end script
# default script for Plex Media Server
# the number of plugins that can run at the same time
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
# ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE
PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000
# uncomment to set it to something else
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/apps/plexmediaserver/MediaLibrary"
# let's set the tmp dir to something useful.
TMPDIR="/apps/plexmediaserver/temp"
# We need to catch our libraries
LD_LIBRARY_PATH="/apps/plexmediaserver/Binaries:$LD_LIBRARY_PATH"
#!/bin/sh
#SCRIPTPATH=$(dirname $(python -c 'import sys,os;print os.path.realpath(sys.argv[1])' $0))
SCRIPT=$(readlink -f $0)
SCRIPTPATH=`dirname ${SCRIPT}`
export LD_LIBRARY_PATH="${SCRIPTPATH}"
export PLEX_MEDIA_SERVER_HOME="${SCRIPTPATH}"
export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
export LC_ALL="en_US.UTF-8"
export LANG="en_US.UTF-8"
ulimit -s 3000
# ./Plex\ Media\ Server
cd /apps/plexmediaserver/Binaries/
./Plex\ Media\ Server
@OmegaZero
Copy link

Awesome, thanks! Can you say how well this runs (i.e. - Can it handle transcoding)?

@gubi
Copy link
Author

gubi commented May 22, 2015

Due an update of my Ubuntu on U3, Plex has stopped working for me.
The guide above didn't worked, so I found this more reliable one: http://www.htpcguides.com/install-plex-media-server-on-odroid-lubuntu-and-debian/

In this way you can maintain Plex ever updated (useful if you have Plex Pass subscription) and also handle a bit of transcoding.

Tip: consider this official guide, if you want to maintain all libraries instead of a new rescan of all ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment