在 CentOS 上部署 Jellyfin 的完整配置步骤
一 环境准备与依赖安装
sudo yum update -y && sudo yum install -y epel-release yum-utils wgetsudo yum install -y libicu fontconfigsudo yum install -y epel-release && sudo yum install -y https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm && sudo yum install -y ffmpegwget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz
tar -xvf ffmpeg-git-amd64-static.tar.xz
sudo cp ffmpeg-git-*-amd64-static/ffmpeg /usr/bin/
sudo cp ffmpeg-git-*-amd64-static/ffprobe /usr/bin/
ffmpeg -version
二 安装 Jellyfin
wget -c https://repo.jellyfin.org/releases/server/centos/stable/web/jellyfin-web-10.8.9-1.el7.noarch.rpm
wget -c https://repo.jellyfin.org/releases/server/centos/stable/server/jellyfin-server-10.8.9-1.el7.x86_64.rpm
wget -c https://repo.jellyfin.org/releases/server/centos/stable/server/jellyfin-10.8.9-1.el7.x86_64.rpm
sudo yum localinstall -y jellyfin-web-*.rpm jellyfin-server-*.rpm jellyfin-*.rpm
sudo systemctl enable --now jellyfin
sudo systemctl status jellyfin
sudo ss -lntp | grep 8096
说明:上述为 RPM 本地安装方式;若网络环境受限,可先下载 RPM 再离线安装。三 防火墙与访问初始化
sudo firewall-cmd --zone=public --add-port=8096/tcp --permanent
sudo firewall-cmd --zone=public --add-port=8920/tcp --permanent
sudo firewall-cmd --zone=public --add-port=1900/udp --permanent
sudo firewall-cmd --zone=public --add-port=5353/udp --permanent
sudo firewall-cmd --reload
端口用途:8096/TCP(HTTP 访问)、8920/TCP(HTTPS 访问)、1900/UDP(DLNA)、5353/UDP(mDNS/Bonjour)。http://<服务器IP>:8096四 转码与硬件加速配置
sudo usermod -aG video jellyfin
sudo systemctl restart jellyfindocker run -d --name jellyfin \
-v /opt/jellyfin/config:/config \
-v /opt/jellyfin/cache:/cache \
-v /mnt/media:/media \
-p 8096:8096 \
--device /dev/dri/renderD128:/dev/dri/renderD128 \
--device /dev/dri/card0:/dev/dri/card0 \
--restart unless-stopped \
jellyfin/jellyfin:latest
说明:硬件加速可显著降低 CPU 占用,具体选项需与硬件和驱动匹配。五 常见问题与优化建议
sudo chown -R jellyfin:jellyfin /mnt/media
sudo chmod -R 755 /mnt/media
sudo journalctl -u jellyfin -f