Jellyfin相对其他的几个流媒体服务器,安装配置方便,更重要的是账号系统更好,也有对应的手机客户端。
安装
ubuntu@VM-0-3-ubuntu:~api curl gnupg
ubuntu@VM-0-3-ubuntu:~ sudo rm /etc/apt/sources.list.d/jellyfin.list
ubuntu@VM-0-3-ubuntu:~sudo apt install apt-transport-https
ubuntu@VM-0-3-ubuntu:~ sudo add-apt-repository universe
ubuntu@VM-0-3-ubuntu:~curl -fsSL https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/debian-jellyfin.gpg
ubuntu@VM-0-3-ubuntu:~ echo "deb [arch=( dpkg --print-architecture )] https://repo.jellyfin.org/ubuntu( lsb_release -c -s ) main" | sudo tee /etc/apt/sources.list.d/jellyfin.list
deb [arch=amd64] https://repo.jellyfin.org/ubuntu focal main
ubuntu@VM-0-3-ubuntu:~sudo apt update
ubuntu@VM-0-3-ubuntu:~ sudo apt install jellyfin
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
jellyfin-ffmpeg5 jellyfin-server jellyfin-web libaacs0 libass9 libbdplus0 libbluray2 libcairo2 libllvm11 libmp3lame0 libopus0 libpixman-1-0
libtheora0 libvorbisenc2 libvpx6 libwebpmux3 libx264-155 libx265-179 libxcb-render0 libxcb-xfixes0 libzvbi-common libzvbi0 ocl-icd-libopencl1
Suggested packages:
libbluray-bdj opus-tools opencl-icd
The following NEW packages will be installed:
jellyfin jellyfin-ffmpeg5 jellyfin-server jellyfin-web libaacs0 libass9 libbdplus0 libbluray2 libcairo2 libllvm11 libmp3lame0 libopus0 libpixman-1-0
libtheora0 libvorbisenc2 libvpx6 libwebpmux3 libx264-155 libx265-179 libxcb-render0 libxcb-xfixes0 libzvbi-common libzvbi0 ocl-icd-libopencl1
0 upgraded, 24 newly installed, 0 to remove and 123 not upgraded.
Need to get 147 MB of archives.
After this operation, 524 MB of additional disk space will be used
查看服务
ubuntu@VM-0-3-ubuntu:~$ sudo systemctl status jellyfin
● jellyfin.service - Jellyfin Media Server
Loaded: loaded (/lib/systemd/system/jellyfin.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/jellyfin.service.d
└─jellyfin.service.conf
Active: active (running) since Mon 2022-10-17 09:55:22 CST; 40s ago
Main PID: 154276 (jellyfin)
Tasks: 21 (limit: 2264)
Memory: 131.8M
CGroup: /system.slice/jellyfin.service
└─154276 /usr/bin/jellyfin --webdir=/usr/share/jellyfin/web --restartpath=/usr/lib/jellyfin/restart.sh --ffmpeg=/usr/lib/jellyfin-ffmpeg/f>
前端反代
jellyfin默认端口是8096,配置apache在前端进行反代,就无需在服务器另放心端口。
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
ServerName www.hotpod.cn
ServerAlias hotpod.cn
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ProxyPass "/" "http://127.0.0.1:8096/"
ProxyPassReverse "/" "http://127.0.0.1:8096/"
ErrorLog {APACHE_LOG_DIR}/error.log
CustomLog{APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>