Ubuntu 20.04 LTS 安装 Plex Media Server
基础环境
i5 8600t
4GB RAM
400GB datastore
Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-48-generic x86_64)
步骤1.首先,通过apt在终端中运行以下命令,确保所有系统软件包都是最新的。
sudo apt update
sudo apt upgrade
步骤2.在Ubuntu 20.04上安装Plex Media Server。
使用curl命令导入Plex存储库的GPG密钥:
curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
//安装存储库的密钥 root@tonkai-virtual-machine:~# curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add - Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)). Command 'curl' not found, but can be installed with: snap install curl # version 7.84.0, or apt install curl # version 7.81.0-1ubuntu1.4 See 'snap info curl' for additional versions. gpg: 找不到有效的 OpenPGP 数据。 root@tonkai-virtual-machine:~# apt install curl 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: chromium-codecs-ffmpeg-extra gstreamer1.0-vaapi i965-va-driver intel-media-va-driver libaacs0 libaom3 libass9 libavcodec58 libavformat58 libavutil56 libbdplus0 libblas3 libbluray2 libbs2b0 libchromaprint1 libcodec2-1.0 libdav1d5 libflite1 libgme0 libgsm1 libgstreamer-plugins-bad1.0-0 libigdgmm12 liblilv-0-0 libmd4c0 libmfx1 libmysofa1 libnorm1 libopenmpt0 libpgm-5.3-0 libpostproc55 libqt5gui5 libqt5svg5 libqt5widgets5 librabbitmq4 librubberband2 libserd-0-0 libshine3 libsnappy1v5 libsord-0-0 libsratom-0-0 libsrt1.4-gnutls libssh-gcrypt-4 libswresample3 libswscale5 libudfread0 libva-drm2 libva-wayland2 libva-x11-2 libva2 libvdpau1 libvidstab1.1 libx265-199 libxcb-xinerama0 libxcb-xinput0 libxvidcore4 libzimg2 libzmq5 libzvbi-common libzvbi0 mesa-va-drivers mesa-vdpau-drivers pocketsphinx-en-us qt5-gtk-platformtheme systemd-hwe-hwdb va-driver-all vdpau-driver-all 使用'apt autoremove'来卸载它(它们)。 下列【新】软件包将被安装: curl 升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 9 个软件包未被升级。 需要下载 194 kB 的归档。 解压缩后会消耗 453 kB 的额外空间。 获取:1 http://cn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 curl amd64 7.81.0-1ubuntu1.4 [194 kB] 已下载 194 kB,耗时 2秒 (120 kB/s) 正在选中未选择的软件包 curl。 (正在读取数据库 ... 系统当前共安装有 204843 个文件和目录。) 准备解压 .../curl_7.81.0-1ubuntu1.4_amd64.deb ... 正在解压 curl (7.81.0-1ubuntu1.4) ... 正在设置 curl (7.81.0-1ubuntu1.4) ... 正在处理用于 man-db (2.10.2-1) 的触发器 ... root@tonkai-virtual-machine:~# curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add - Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)). % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 3072 100 3072 0 0 2595 0 0:00:01 0:00:01 --:--:-- 2596 OK
接下来,将Plex存储库添加到Ubuntu系统:
echo "deb https://downloads.plex.tv/repo/deb public main" | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
root@tonkai-virtual-machine:~# echo "deb https://downloads.plex.tv/repo/deb public main" | sudo tee /etc/apt/sources.list.d/plexmediaserver.list deb https://downloads.plex.tv/repo/deb public main root@tonkai-virtual-machine:~# sudo apt update 命中:1 https://dl.google.com/linux/chrome/deb stable InRelease 获取:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB] 命中:3 http://cn.archive.ubuntu.com/ubuntu jammy InRelease 获取:4 http://cn.archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB] 命中:5 https://ppa.launchpadcontent.net/qbittorrent-team/qbittorrent-stable/ubuntu jammy InRelease 获取:6 https://downloads.plex.tv/repo/deb public InRelease [6,685 B] 获取:7 http://security.ubuntu.com/ubuntu jammy-security/main amd64 DEP-11 Metadata [13.0 kB] 获取:8 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 DEP-11 Metadata [12.2 kB] 获取:9 https://downloads.plex.tv/repo/deb public/main amd64 Packages [464 B] 获取:10 http://cn.archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB] 获取:11 http://cn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 DEP-11 Metadata [92.9 kB] 获取:12 http://cn.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 DEP-11 Metadata [247 kB] 获取:13 http://cn.archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 DEP-11 Metadata [944 B] 获取:14 http://cn.archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [6,756 B] 获取:15 http://cn.archive.ubuntu.com/ubuntu jammy-backports/universe i386 Packages [5,204 B] 获取:16 http://cn.archive.ubuntu.com/ubuntu jammy-backports/universe amd64 DEP-11 Metadata [12.4 kB] 已下载 721 kB,耗时 3秒 (260 kB/s) 正在读取软件包列表... 完成server 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 有 9 个软件包可以升级。请执行 ‘apt list --upgradable’ 来查看它们。 W: https://downloads.plex.tv/repo/deb/dists/public/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
最后,我们所需要做的就是将plex软件包放在某个位置,并运行一个命令来安装它:
sudo apt update
sudo apt install plexmediaserver
root@tonkai-virtual-machine:~# sudo apt install plexmediaserver 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: chromium-codecs-ffmpeg-extra gstreamer1.0-vaapi i965-va-driver intel-media-va-driver libaacs0 libaom3 libass9 libavcodec58 libavformat58 libavutil56 libbdplus0 libblas3 libbluray2 libbs2b0 libchromaprint1 libcodec2-1.0 libdav1d5 libflite1 libgme0 libgsm1 libgstreamer-plugins-bad1.0-0 libigdgmm12 liblilv-0-0 libmd4c0 libmfx1 libmysofa1 libnorm1 libopenmpt0 libpgm-5.3-0 libpostproc55 libqt5gui5 libqt5svg5 libqt5widgets5 librabbitmq4 librubberband2 libserd-0-0 libshine3 libsnappy1v5 libsord-0-0 libsratom-0-0 libsrt1.4-gnutls libssh-gcrypt-4 libswresample3 libswscale5 libudfread0 libva-drm2 libva-wayland2 libva-x11-2 libva2 libvdpau1 libvidstab1.1 libx265-199 libxcb-xinerama0 libxcb-xinput0 libxvidcore4 libzimg2 libzmq5 libzvbi-common libzvbi0 mesa-va-drivers mesa-vdpau-drivers pocketsphinx-en-us qt5-gtk-platformtheme systemd-hwe-hwdb va-driver-all vdpau-driver-all 使用'sudo apt autoremove'来卸载它(它们)。 推荐安装: beignet-opencl-icd 下列【新】软件包将被安装: plexmediaserver 升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 9 个软件包未被升级。 需要下载 84.6 MB 的归档。 解压缩后会消耗 251 MB 的额外空间。 获取:1 https://downloads.plex.tv/repo/deb public/main amd64 plexmediaserver amd64 1.28.2.6151-914ddd2b3 [84.6 MB] 已下载 84.6 MB,耗时 10秒 (8,230 kB/s) 正在选中未选择的软件包 plexmediaserver。 (正在读取数据库 ... 系统当前共安装有 204850 个文件和目录。) 准备解压 .../plexmediaserver_1.28.2.6151-914ddd2b3_amd64.deb ... PlexMediaServer install: Pre-installation Validation. PlexMediaServer install: Pre-installation Validation complete. 正在解压 plexmediaserver (1.28.2.6151-914ddd2b3) ... 正在设置 plexmediaserver (1.28.2.6151-914ddd2b3) ... PlexMediaServer install: PlexMediaServer-1.28.2.6151-914ddd2b3 - Installation starting. PlexMediaServer install: PlexMediaServer install: Now installing based on: PlexMediaServer install: Installation Type: New PlexMediaServer install: Process Control: systemd PlexMediaServer install: Plex User: plex PlexMediaServer install: Plex Group: plex PlexMediaServer install: Video Group: render PlexMediaServer install: Metadata Dir: /var/lib/plexmediaserver/Library/Application Support PlexMediaServer install: Temp Directory: /tmp PlexMediaServer install: Lang Encoding: en_US.UTF-8 PlexMediaServer install: Processor: Intel(R) Core(TM) i5-8600T CPU @ 2.30GHz PlexMediaServer install: Intel i915 Hardware: Not found PlexMediaServer install: Nvidia GPU card: Not 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.28.2.6151-914ddd2b3 - Installation successful. Errors: 0, Warnings: 0 正在处理用于 desktop-file-utils (0.26-1ubuntu3) 的触发器 ... 正在处理用于 gnome-menus (3.36.0-1ubuntu3) 的触发器 ... 正在处理用于 mailcap (3.70+nmu1ubuntu1) 的触发器 ...
现在,已安装Plex媒体服务器。我们可以通过以下方式查看其状态:
sudo systemctl status plexmediaserver
root@tonkai-virtual-machine:~# systemctl status plexmediaserver ● plexmediaserver.service - Plex Media Server Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2022-09-28 15:27:13 CST; 44s ago Process: 27607 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" (code=exited, status=0/SUCCESS) Main PID: 27609 (Plex Media Serv) Tasks: 118 (limit: 4620) Memory: 227.6M CPU: 21.023s CGroup: /system.slice/plexmediaserver.service ├─27609 "/usr/lib/plexmediaserver/Plex Media Server" ├─27635 "Plex Plug-in [com.plexapp.system]" /usr/lib/plexmediaserver/Resources/Plug-ins-914ddd2b3/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.28.2.6151-914ddd2b3 /usr/lib/plexmediase> ├─27715 "/usr/lib/plexmediaserver/Plex Tuner Service" /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.28.2.6151-914ddd2b3 32600 ├─28037 "Plex Plug-in [com.plexapp.agents.thetvdb]" /usr/lib/plexmediaserver/Resources/Plug-ins-914ddd2b3/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.28.2.6151-914ddd2b3 /usr/lib/ple> ├─28095 "Plex Plug-in [tv.plex.agents.music]" /usr/lib/plexmediaserver/Resources/Plug-ins-914ddd2b3/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.28.2.6151-914ddd2b3 /usr/lib/plexmedia> ├─28221 "Plex Plug-in [tv.plex.agents.series]" /usr/lib/plexmediaserver/Resources/Plug-ins-914ddd2b3/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.28.2.6151-914ddd2b3 /usr/lib/plexmedi> ├─28260 "Plex Plug-in [tv.plex.agents.movie]" /usr/lib/plexmediaserver/Resources/Plug-ins-914ddd2b3/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.28.2.6151-914ddd2b3 /usr/lib/plexmedia> ├─28307 "Plex Plug-in [com.plexapp.agents.imdb]" /usr/lib/plexmediaserver/Resources/Plug-ins-914ddd2b3/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.28.2.6151-914ddd2b3 /usr/lib/plexme> └─28332 "Plex Plug-in [com.plexapp.agents.localmedia]" /usr/lib/plexmediaserver/Resources/Plug-ins-914ddd2b3/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.28.2.6151-914ddd2b3 /usr/lib/> 9月 28 15:27:13 tonkai-virtual-machine systemd[1]: Starting Plex Media Server... 9月 28 15:27:13 tonkai-virtual-machine systemd[1]: Started Plex Media Server.
步骤3.配置Plex。
现在,打开Web浏览器并输入以下地址。使用您的Ubuntu 20.04 IP地址更改IP地址:
http://你的服务器IP地址:32400/web
要使用Plex Media Server,您将需要创建一个Plex帐户或使用现有帐户登录或登录Google / Facebook或Apple帐户。
恭喜你!您已经成功安装了Plex。