If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Plex Media Server - Debian repository

OriginOrigin Posts: 74Members, Plex Pass Plex Pass
edited November 2012 in Linux
EDIT 30th of August, 2012 : the repository is now maintained by MoxZ

First Time install
sudo echo "deb http://shell.ninthgate.se/packages/debian squeeze main" >> /etc/apt/sources.list
sudo curl http://shell.ninthgate.se/packages/shell-ninthgate-se-keyring.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install plexmediaserver


Upgrading
sudo apt-get update
sudo apt-get upgrade


EDIT 10th of November, 2011 : the repository is up ! see below ;)

Here is the Debian Repository for PMS. Based on the work by Tobias Hieta who made the Ubuntu one (thanks to him ! He is in the greetings of the package description).

You only have to add this line in your /etc/apt/sources.list :

deb http://plex.originet.eu/ stable main


Then, do a :

apt-get install plexmediaserver

and let's rock !

HISTORY : First write

Hi guys,

I'm preparing a Debian squeeze package for Plex Media Server, derived from the Ubuntu binary package. Before the repository is ready and all the package is fully tested, Here is the first version of the startup script. Start/Stop/Status/Restart are authorized commands. You can already just install the Ubuntu package directly with the official repo and use this script :

- make a new script in /etc/init.d with the name "plexmediaserver" and paste the whole code below into it.
- make a chmod +x /etc/init.d/plexmediaserver
- make a "update-rc.d plexmediaserver enable"

You are good to go ;)

Thanks in advance for the comments and/or suggestions regarding the little piece of code ;)
Cédric

### BEGIN INIT INFO
# Provides:          plexmediaserver
# Required-Start:    $remote_fs $syslog $all
# 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 his wonderfull job !
# Author:            Cedric Quillevere / origin@killy.net
# Version:           1.0a
### END INIT INFO

test -f "/usr/lib/plexmediaserver/Plex Media Server" || exit 0

export PMS_RUN_USER="plex"

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 $PMS_RUN_USER -c "/usr/sbin/start_pms &" >/dev/null 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
        # Trying to kill the Plex Media Server itself but also the Plug-ins
	echo -n "Killing Plex Media Server: "
	ps ax | grep "Plex Media 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
«13456711

Comments

  • knepknep Posts: 2Members, Plex Pass Plex Pass
    Hi,
    I've just try it and it works perfectly. :)
    Thanks for the works!
  • OriginOrigin Posts: 74Members, Plex Pass Plex Pass
    edited November 2011
    Hi again folks,

    Here is the first version of a Debian Repository for PMS. Based on the work by Tobias Hieta who made the Ubuntu one (thanks to him ! He is in the greetings of the package description).

    You only have to add this line in your /etc/apt/sources.list :

    deb http://plex.originet.eu/ stable main
    


    Then, do a :

    apt-get install plexmediaserver
    

    and let's rock !

    Cedric
  • AeriffAeriff Posts: 1Members
    edited November 2011
    Hi Cedric,

    Thanks for your awesome work on this - would love to give it a try except it seems your package depends on ia32-libs, which of course those of us on a 32-bit kernel don't need :) Is there any chance you can remove this dependency and repackage it?

    Cheers,
    Jarred

    edit: managed to get it installed with dpkg --ignore-depends=ia32-libs but have to apt-get -f install every time I want to use aptitude which removes plexmediaserver due to unmet dependencies
  • OriginOrigin Posts: 74Members, Plex Pass Plex Pass
    Yes, true. I'll make two real different packages with according depencies. Thanks for the info !
  • OriginOrigin Posts: 74Members, Plex Pass Plex Pass
    edited November 2011
    Job's done, could you test the 32bits version ? A little 'apt-get update', before trying, obviously ;)
    I'll install a 32bit debian in a new VM soon yo be able to test the 2 distros.
  • ManMan Posts: 246Members ✭✭
    edited November 2011
    Works great.

    edit:except it doesnt, wont let me add any directories to scan. It seems the reason is that the agents doesnt show up. And they dont show up at the preferences either.
  • JCnMEJCnME Posts: 17Members, Plex Pass Plex Pass
    Just installed on my Deb x64 bit machine, worked first time no issues,

    thanks for the easy build!

    JC
  • ManMan Posts: 246Members ✭✭
    I use Voyage 32bit, a super minimal Debian distro. PMS does not work properly. Cant add folders.
  • OriginOrigin Posts: 74Members, Plex Pass Plex Pass
    You don't have any access to the web interface http://yourserver.local:32400/manage/ or it does not work correctly ?
  • ManMan Posts: 246Members ✭✭
    I have access. I can access it via hostname.local/ip:32400. I can add a folder to music, movies, tv series, but nothing happens when I click OK. The dialog just stay open. So that means i cant add a folder after all.
  • OriginOrigin Posts: 74Members, Plex Pass Plex Pass
    It seems that this a specific bug on your distro. You should initiate a topic in the bug section I think.

    Do you have any "http" like errors in the Logs/Plex Media Server.log ?
  • ManMan Posts: 246Members ✭✭
    I cant seem to find the log files.
  • OriginOrigin Posts: 74Members, Plex Pass Plex Pass
    /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs
  • ManMan Posts: 246Members ✭✭
    No errors. Its 1.1MB big though. Thats kinda big..? same size with *.old.log
  • JOJO02JOJO02 Posts: 2Members
    edited November 2011
    Adding system startup for /etc/init.d/plexmediaserver ...
    /etc/rc0.d/K20plexmediaserver -> ../init.d/plexmediaserver
    /etc/rc1.d/K20plexmediaserver -> ../init.d/plexmediaserver
    /etc/rc6.d/K20plexmediaserver -> ../init.d/plexmediaserver
    /etc/rc2.d/S20plexmediaserver -> ../init.d/plexmediaserver
    /etc/rc3.d/S20plexmediaserver -> ../init.d/plexmediaserver
    /etc/rc4.d/S20plexmediaserver -> ../init.d/plexmediaserver
    /etc/rc5.d/S20plexmediaserver -> ../init.d/plexmediaserver
    Plex Media Server is not running (no process found)...
    Starting Plex Media Server: done

    Installed
    But can't make plex running

    there is no plexmediaserver process

    I can run init script as many times as I like
    sudo /etc/init.d/plexmediaserver start

    but no plex is showing up runnig

    My system
    2.6.26-2-amd64 #1 SMP x86_64 GNU/Linux
  • mvdstammvdstam Posts: 7Members
    This works terrifically. No hassle, no problems so far whatsoever.

    Keep up the awesome work; this is really neat stuff. :)
  • WhoYaWittWhoYaWitt Posts: 15Members
    Might want to add rsync to the required packages. I installed on a clean Debian distro (headless w/ only ssh & system tools) and got the 404 error when trying to connect via browser. I found another post regarding the rsync dependency, I did an apt-get install rsync and problem solved.
  • OriginOrigin Posts: 74Members, Plex Pass Plex Pass
    edited November 2011
    Okay, i'll add this dependency to the next release, thx for the info.
  • yakumoyakumo Posts: 1,095Members, Plex Pass, Plex Ninja Plex Ninja
    Great =) Now I can soon convert back to debian =)
  • OriginOrigin Posts: 74Members, Plex Pass Plex Pass
    JOJO_1 wrote:

    Adding system startup for /etc/init.d/plexmediaserver ...
    /etc/rc0.d/K20plexmediaserver -> ../init.d/plexmediaserver
    /etc/rc1.d/K20plexmediaserver -> ../init.d/plexmediaserver
    /etc/rc6.d/K20plexmediaserver -> ../init.d/plexmediaserver
    /etc/rc2.d/S20plexmediaserver -> ../init.d/plexmediaserver
    /etc/rc3.d/S20plexmediaserver -> ../init.d/plexmediaserver
    /etc/rc4.d/S20plexmediaserver -> ../init.d/plexmediaserver
    /etc/rc5.d/S20plexmediaserver -> ../init.d/plexmediaserver
    Plex Media Server is not running (no process found)...
    Starting Plex Media Server: done

    Installed
    But can't make plex running

    there is no plexmediaserver process

    I can run init script as many times as I like
    sudo /etc/init.d/plexmediaserver start

    but no plex is showing up runnig

    My system
    2.6.26-2-amd64 #1 SMP x86_64 GNU/Linux


    Following the depency problem within rsync mentioned by WhoYaWitt, did you tried to install rsync and relaunch pms ?
    Perhaps it's the root cause ?
«13456711
This discussion has been closed.