Recipe for Plex Server

  • base netinst install of jessie - deselect everything from tasksel
    • hostname plex – domain williams.lcl
    • default partition layout (discard, noatime on root)
  • > /etc/motd
  • apt-get --no-install-recommends install aptitude
  • aptitude install ssh (this will pull in xauth, but that's okay)
  • aptitude install fbset screen rsync psmisc file patch ethtool strace tcpdump vim
  • aptitude --without-recommends install dnsutils
  • adduser tdobes adm
  • aptitude install dbus
  • sed -i -e 's/^deb.* main$/& contrib non-free/g' /etc/apt/sources.list
  • aptitude update && aptitude forget-new
  • aptitude install intel-microcode firmware-linux-nonfree # firmware for TV tuner card
  • aptitude install ifplugd
  • sed -i -e 's/^INTERFACES=""/INTERFACES="eth0"/g' /etc/default/ifplugd
  • sed -i -e 's/^allow-hotplug eth0/#allow-hotplug eth0/g' /etc/network/interfaces
  • aptitude --without-recommends install ntp
    echo '[Unit]' > /etc/systemd/system/ntp.service
    echo 'Description=Network Time Protocol daemon' >> /etc/systemd/system/ntp.service
    echo 'After=network.target' >> /etc/systemd/system/ntp.service
    echo >> /etc/systemd/system/ntp.service
    echo '[Service]' >> /etc/systemd/system/ntp.service
    echo 'ExecStart=/usr/sbin/ntpd -n -g -u ntp:ntp' >> /etc/systemd/system/ntp.service
    echo >> /etc/systemd/system/ntp.service
    echo '[Install]' >> /etc/systemd/system/ntp.service
    echo 'WantedBy=multi-user.target' >> /etc/systemd/system/ntp.service
    systemctl enable ntp.service
  • mkdir -p /etc/systemd/system/ssh.socket.d
    echo '[Socket]' > /etc/systemd/system/ssh.socket.d/port-2222.conf
    echo 'ListenStream=2222' >> /etc/systemd/system/ssh.socket.d/port-2222.conf
    systemctl disable ssh.service && systemctl enable ssh.socket
  • mkdir -p /etc/systemd/system/getty\@tty1.service.d
    echo '[Service]' > /etc/systemd/system/getty\@tty1.service.d/noclear.conf
    echo 'TTYVTDisallocate=no' >> /etc/systemd/system/getty\@tty1.service.d/noclear.conf
  • systemctl mask networking.service # we use ifplugd instead
    echo 'D /run/network 0755 root root' > /etc/tmpfiles.d/debian-networking.conf
    echo 'F /run/network/ifstate 0644 root root - lo=lo' >> /etc/tmpfiles.d/debian-networking.conf
  • aptitude purge acpid acpi-support-base # systemd-logind takes care of this
  • systemctl mask keyboard-setup.service
    systemctl mask console-setup.service
    systemctl mask rc-local.service
  • aptitude --without-recommends install nfs-common
    echo 'memoryalpha:/tank/music        /mnt/music     nfs     _netdev,auto,hard,nfsvers=3     0       0' >> /etc/fstab
    echo 'memoryalpha:/tank/photos        /mnt/photos     nfs     _netdev,auto,hard,nfsvers=3     0       0' >> /etc/fstab
    echo 'memoryalpha:/tank/videos        /mnt/videos     nfs     _netdev,auto,hard,nfsvers=3     0       0' >> /etc/fstab
    mkdir -p /mnt/music /mnt/photos /mnt/videos
    mount /mnt/music
    mount /mnt/photos
    mount /mnt/videos
  • wget -O- "http://apt.tvheadend.org/repo.gpg.key" | apt-key add -
    echo 'deb http://apt.tvheadend.org/stable wheezy main' > /etc/apt/sources.list.d/tvheadend.list
    aptitude update && aptitude install tvheadend
    ** you'll be asked to create a root user for tvheadend.  username: root  **
  • sed -i 's/docs.tms.tribune.com/dd.schedulesdirect.org/g' /usr/bin/tv_grab_na_dd
  • su -s /bin/sh hts -c "tv_grab_na_dd --configure" # enter schedulesdirect username and password as prompted
  • TODO: Configure tvheadend – http://plex.williams.lcl:9981/
  • wget -O- "http://shell.ninthgate.se/packages/shell-ninthgate-se-keyring.key" | apt-key add -
    echo 'deb http://shell.ninthgate.se/packages/debian wheezy main' > /etc/apt/sources.list.d/plexmediaserver.list
    aptitude update && aptitude install plexmediaserver
    systemctl enable plexmediaserver
  • TODO: Configure plex – http://plex.williams.lcl:32400/web/

See also: https://forums.plex.tv/index.php/topic/32852-plex-media-server-debian-repository/ See also: https://forums.plex.tv/index.php/topic/51427-plex-media-server-for-debian/ See also: http://www.htpcguides.com/install-plex-media-server-on-debian-linux/ See also: https://tvheadend.org/projects/tvheadend/wiki/AptRepository#Debian-Apt-Repository

  • *** REMOVE THIS STUFF; it doesn't seem to be needed: ***
    echo 'deb http://www.deb-multimedia.org jessie main non-free' > /etc/apt/sources.list.d/dmo.list
    echo 'deb http://www.deb-multimedia.org jessie-backports main' >> /etc/apt/sources.list.d/dmo.list
    aptitude update
    aptitude -o Aptitude::Cmdline::ignore-trust-violations=true install deb-multimedia-keyring
    aptitude update
    
computer/plex_server.txt · Last modified: 2016/01/04 12:11 by tdobes
Recent changes RSS feed Driven by DokuWiki Valid XHTML 1.0 Valid CSS