更新时间:2022-12-28 11:00:47浏览次数:978+次
本文介绍如何在Ubuntu 22.04 Linux操作系统上安装和配置Plex Media Server的方法。
简介
Plex是用于媒体流的服务器,它能够将所有媒体内容存储在一个位置,并使用客户端应用程序访问它们,例如另一台计算机或移动设备。Plex服务器以适当的方式组织上传的内容,使客户端易于访问。
在本文中,我们将了解如何在Ubuntu 22.04系统上安装Plex媒体服务器。我们将从Plex网站下载Ubuntu 22.04的最新Plex媒体服务器。安装基本依赖项如下,请在终端中执行以下命令:
sudo apt update
sudo apt install wget curl gpg gnupg2 software-properties-common apt-transport-https lsb-release ca-certificates
安装和配置Plex Media Server的方法
1、添加Plex Media Server APT存储库
将Plex APT存储库添加到您的系统:
echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
导入GPG密钥:
wget https://downloads.plex.tv/plex-keys/PlexSign.key
cat PlexSign.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/PlexSigkey.gpg
添加存储库后更新包索引:
sudo apt update
2、在Ubuntu 22.04上安装Plex Media服务器
下载后,转到下载的Plex媒体目录,运行以下命令安装Plex:
$ sudo apt install plexmediaserver
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
libcamel-1.2-62 libdpkg-perl libextutils-pkgconfig-perl libfile-fcntllock-perl libgupnp-1.2-0 pkg-config
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
beignet-opencl-icd ocl-icd-libopencl1
The following NEW packages will be installed:
beignet-opencl-icd ocl-icd-libopencl1 plexmediaserver
0 upgraded, 3 newly installed, 0 to remove and 836 not upgraded.
Need to get 94.8 MB of archives.
After this operation, 291 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
3、检查Plex媒体服务器状态
安装后,Plex Media服务器将自动运行。检查状态,如下所示:
$ systemctl status plexmediaserver.service
plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
Active: active (running)
现在,通过运行以下命令,使Plex服务器在系统启动时自动启动:
sudo systemctl enable plexmediaserver.service
确认服务已启用:
$ systemctl is-enabled plexmediaserver.service
enabled
如果您正在运行活动防火墙,请确保通过防火墙打开端口32400,如下所示:
sudo ufw allow 32400
4、在Ubuntu 22.04上配置Plex Media Server
在端口32400上从浏览器访问Plex Media服务器以对其进行配置。在浏览器上,键入http://<plex-media-server-ip>:32400/web。您应该看到一个屏幕,显示提示您登录plex的位置:
登录后,单击下一页底部的获取:
在下一页中,给一个名称,并确保选中允许我在家外访问媒体的框。单击“下一步”:
在下一页中,添加库。单击添加库:
这将带您进入选择要添加的库的页面。选择后,单击“下一步”。您可以返回添加更多库:
继续向库中添加文件夹。单击浏览媒体文件夹,添加后单击底部的添加按钮,然后在下一个屏幕上单击添加库。您可以使用尽可能多的库:
添加所选库后,单击“下一步”。你会看到一个屏幕,告诉你所有的都已经设置好,并指导你获取复杂的应用程序。单击“完成”:
在下一页中,您将看到标记的所有源。取消标记任何不需要的内容,然后单击底部的“完成设置”。您将被带到如图所示的屏幕:
至此,配置Plex Media Server的工作就此完成,用户也可以给Plex Media Server配置SSL证书,让访问更加的安全可靠。
相关资讯