Plex: Difference between revisions

From Hurlster Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 35: Line 35:
  $ sudo mkdir -p /media/usbhdd1
  $ sudo mkdir -p /media/usbhdd1
  $ sudo reboot
  $ sudo reboot
== OpenPHT ==
* Ubuntu 14.04 Trusty install
apt-get build-dep kodi
https://github.com/RasPlex/OpenPHT/releases
https://github.com/RasPlex/OpenPHT/releases/download/v1.6.2.123-e23a7eef/openpht_1.6.2.123-e23a7eef-trusty_amd64.deb
* /etc/init.d/plexhometheater
<pre>
#!/bin/sh
### BEGIN INIT INFO
# Provides:          plexhometheater
# Required-Start:    $all
# Required-Stop:    $all
# Default-Start:    2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts instance of Plex Home Theater
# Description:      starts instance of Plex Home Theater using start-stop-daemon and xinit
### END INIT INFO
############### EDIT ME ##################
# Read configuration variable file if it is present
[ -r /etc/default/plexhometheater ] && . /etc/default/plexhometheater
# path to xinit exec
DAEMON=/usr/bin/xinit
# startup args
DAEMON_OPTS="/usr/bin/openpht"
# script name
NAME=plexhometheater
# app name
DESC="Plex Home Theater"
# user
RUN_AS=root
# Path of the PID file
PID_FILE=/var/run/plexhometheater.pid
############### END EDIT ME ##################
test -x $DAEMON || exit 0
set -e
case "$1" in
  start)
        echo "Starting $DESC"
        start-stop-daemon --start -c $RUN_AS --background --pidfile $PID_FILE  --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
        ;;
  stop)
        echo "Stopping $DESC"
        start-stop-daemon --stop --pidfile $PID_FILE
        ;;
  restart|force-reload)
        echo "Restarting $DESC"
        start-stop-daemon --stop --pidfile $PID_FILE
        sleep 5
        start-stop-daemon --start -c $RUN_AS --background --pidfile $PID_FILE  --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
        ;;
  *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac
exit 0
</pre>


[[Category:Linux]]
[[Category:Linux]]

Revision as of 23:38, 8 July 2016

Plex mediaserver
Installation on RaspberryPi 2 Get and install Rasbian Lite

https://downloads.raspberrypi.org/raspbian_lite_latest.torrent
  • Burn with Win32DiskImager

Prepare wireless network (/etc/wpa_supplicant/wpa_supplicant.conf)

network={
ssid="SSID"
psk="SSIDPASSWD"
}

Install updated tools

$ sudo wget -q -O - https://www.bunkus.org/gpg-pub-moritzbunkus.txt | sudo apt-key add -
$ sudo apt-get update && sudo apt-get upgrade -y
$ sudo nano /etc/apt/sources.list.d/bunkus.list

add these lines......

deb http://www.bunkus.org/debian/jessie/ ./
deb-src http://www.bunkus.org/debian/jessie/ ./

Then install plexmediaserver on raspberrypi 2

$ sudo wget https://dev2day.de/plex-latest
$ sudo dpkg -i plex-latest
$ sudo apt-get install mkvtoolnix libexpat1 libav-tools ntfs-3g samba samba-common exfat-utils -y
$ sudo wget -q -O - http://dev2day.de/pms/dev2day-pms.gpg.key | sudo apt-key add -
$ sudo su
# echo "deb http://dev2day.de/pms/ jessie main" >> /etc/apt/sources.list.d/pms.list
# apt-get update
# apt-get install plexmediaserver
  • left out ffmpeg

Mount external(USB/HDD) disk:

$ sudo nano /etc/fstab
/dev/sda1 /media/usbhdd1 ntfs-3g gid=pi,uid=pi,noatime 0 0
$ sudo mkdir -p /media/usbhdd1
$ sudo reboot

OpenPHT

  • Ubuntu 14.04 Trusty install
apt-get build-dep kodi
https://github.com/RasPlex/OpenPHT/releases
https://github.com/RasPlex/OpenPHT/releases/download/v1.6.2.123-e23a7eef/openpht_1.6.2.123-e23a7eef-trusty_amd64.deb
  • /etc/init.d/plexhometheater
#!/bin/sh

### BEGIN INIT INFO
# Provides:          plexhometheater
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts instance of Plex Home Theater
# Description:       starts instance of Plex Home Theater using start-stop-daemon and xinit
### END INIT INFO

############### EDIT ME ##################

# Read configuration variable file if it is present
[ -r /etc/default/plexhometheater ] && . /etc/default/plexhometheater

# path to xinit exec
DAEMON=/usr/bin/xinit

# startup args
DAEMON_OPTS="/usr/bin/openpht"

# script name
NAME=plexhometheater

# app name
DESC="Plex Home Theater"

# user
RUN_AS=root

# Path of the PID file
PID_FILE=/var/run/plexhometheater.pid

############### END EDIT ME ##################

test -x $DAEMON || exit 0

set -e

case "$1" in
  start)
        echo "Starting $DESC"
        start-stop-daemon --start -c $RUN_AS --background --pidfile $PID_FILE  --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
        ;;
  stop)
        echo "Stopping $DESC"
        start-stop-daemon --stop --pidfile $PID_FILE
        ;;

  restart|force-reload)
        echo "Restarting $DESC"
        start-stop-daemon --stop --pidfile $PID_FILE
        sleep 5
        start-stop-daemon --start -c $RUN_AS --background --pidfile $PID_FILE  --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
        ;;
  *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

exit 0