Universal Plex Media Server installation on Debian-based Linux.
Plex Media Server is now universally installable on Debian-based Linux systems using the same .deb
package file; free of the previous SYSV-init and systemd requirements.
The only remaining requirements are those imposed by the executables (glibc 2.14.1 or above - at this time) .
A. The Implementation
-
Intelligent installation in the package itself.
a. Non-destructive pre-installation evaluation.
b. Not changing a running installation unless the installer knows it will succeed.
c. Evaluates each system’s particular configuration and adapting to it.
d. Reports errors as they are found in the pre-installation and actual installation stages.
e. Pre-installation errors force termination of the installation process.
f. Respects the run-time state of PMS (running / stopped / enabled / disabled ) and restores that state after installation
g. Correctly remove and purge on Debian-based systems.
h. Package operations are atomic (obey package manager rules). -
Linux distribution agnostic support.
a. SystemD native
b. SYSV-init native
c. Docker + Linux (LXC) container
d. Custom installations -
Status report of what the pre-installation inspection found and how PMS is configured on the target system. This includes reporting if hardware transcoding capability has been found.
-
System log file tracking of installation activity. Final installation configuration also recorded in the system log to allow audit of automated download and installation via scripted methods.
-
Attempting to install a package will :
a. Validate the target system before beginning actual installation
b. Prohibit installation of PMS into a non-functional configuration. All configuration must pass validation prior to package installation.
c. Not damage a running system during the installation process -
Known Limitations:
a. Should the Linux host be updated which results in a change to the Video group used for /dev/dri, reinstallation of the package file is required. It would be possible to handle this condition oninit
based systems but is not possible or backward compatible forsystemd
based systems.
b. As stated above, should the owner or group (specifically the group) in /dev/dri change after installation, reinstallation will remedy the issue. This is the only time when PMS hasroot
level access to your system (via the Package Manager).
B. What it looks like
- Sample installation session.
# dpkg -i plexmediaserver_1.18.5.2194-74214c250_amd64.deb
(Reading database ... 187286 files and directories currently installed.)
Preparing to unpack plexmediaserver_1.18.5.2194-74214c250_amd64.deb ...
Removed /etc/systemd/system/multi-user.target.wants/plexmediaserver.service.
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: INFO: /etc/systemd/system/plexmediaserver.service.d exists but no override 'conf' files found. Ignored.
PlexMediaServer install: Pre-installation Validation complete.
Unpacking plexmediaserver (1.18.5.2194-74214c250) over (1.18.4.2171-ac2afe5f8) ...
Setting up plexmediaserver (1.18.5.2194-74214c250) ...
PlexMediaServer install:
PlexMediaServer install: Now installing based on:
PlexMediaServer install: Process Control: Systemd
PlexMediaServer install: Plex User: plex
PlexMediaServer install: Plex Group: plex
PlexMediaServer install: Video Group: video
PlexMediaServer install: Metadata Dir: /var/lib/plexmediaserver/Library/Application Support
PlexMediaServer install: Temp Directory: /var/lib/plexmediaserver/tmp_transcoding
PlexMediaServer install: Lang Encoding: en_US.UTF-8
PlexMediaServer install: Transcoding HW: Found
PlexMediaServer install:
PlexMediaServer install: Completing final configuration.
Created symlink /etc/systemd/system/multi-user.target.wants/plexmediaserver.service → /lib/systemd/system/plexmediaserver.service.
PlexMediaServer install: PlexMediaServer-1.18.5.2194-74214c250 - Installation successful.
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
#
- Explaining the output:
a. Process Control - Whether systemd or init based.
b. Plex User - User name Plex is going to run as
c. Plex Group - Group name Plex is going to run as
d. Video Group - Group Plex will use for join for hardware transcoding
e. Metadata Dir - Where the Plex Library is.
f. Temp Dir - Temporary directory used for transcoding
g. Lang Encoding: - Language localization (locale) configured
h. Config file used: - Reported when a customized local configuration is detected
i. HW Transcoding - “Found” or “Not Found” (passive inspection during installation)
When Preinstallation validation is complete, Pre-install writes a combined “Log/Config” file to /tmp/plexinstaller.log. This file is used by the actual installation script (postinst) but also can be used to debug configuration problems by bringing that information to the forums for additional assistance.
Sample Error Messages
During Pre-installation validation, errors will be reported as/when found. Validation checks each critical parameters required to successfully install and run PMS.
A few examples of checked parameters and their error associated error messages are:
Error: Temp directory 'DirName' used in 'OverrideFile' file does not exist.
Error: Unknown username 'OverrideUser' used in OverrideFile'.
Error: Environment variable 'ForbiddenVar' not allowed in 'OverrideFile'
What to expect / Warnings / Reminders
- When upgrading from pre-1.18.5 versions, PMS will enable restart. This is done because older packaging was not sensitive. After upgrading to PMS 1.18.5, upgrading PMS with automatic start at boot time disabled will be respected.
- Installation will no longer blindly install into a configuration which cannot run
- Pre-installation checks generously reports which elements are erred.
- apt --purge will purge everything.
a. Note: Temporarily disabled to allow everyone time to adapt. This will be enabled, per proper Debian package management rules, in the near future.
This has been extensively tested and we do not anticipate any significant issues. We recognize not every possible usage case has been tested and are prepared for those cases.
We will work through any issues as they come up.
Thanks to everyone who contributed to this effort for their inspiration, time, and help bringing this to completion.
When this logic has been proven stable, it will be fitted into the RedHat (RPM) packages.
Discussions and Issue resolution are here: