温馨提示×

centos下jellyfin怎么配置

小樊
35
2026-09-08 23:06:38
栏目: 智能运维

下面按**CentOS 7 / 8(含 Stream)**说明 Jellyfin 的安装与基础配置,以 RPM 包方式为主(最常用、最稳定)。


一、安装 Jellyfin(CentOS)

1. 安装依赖

sudo yum install -y epel-release
sudo yum install -y ffmpeg

CentOS 8 / Stream 用 dnf

sudo dnf install -y epel-release
sudo dnf install -y ffmpeg

2. 添加 Jellyfin 官方仓库

sudo rpm --import https://repo.jellyfin.org/centos/jellyfin.key
sudo yum install -y https://repo.jellyfin.org/centos/jellyfin-repo.noarch.rpm

3. 安装 Jellyfin

sudo yum install -y jellyfin

4. 启动并设置开机自启

sudo systemctl enable --now jellyfin

查看状态:

systemctl status jellyfin

默认端口:8096


二、防火墙配置(重要)

sudo firewall-cmd --permanent --add-port=8096/tcp
sudo firewall-cmd --reload

浏览器访问:

http://服务器IP:8096

三、初始 Web 配置

  1. 创建管理员账号
  2. 添加媒体库
    • 类型:电影 / 电视剧 / 音乐
    • 路径示例:
      /data/movies
      /data/tv
      
  3. 语言 & 元数据
    • 偏好语言:中文
    • 元数据下载器:TheMovieDb

四、媒体目录权限(常见坑)

假设媒体在 /data

sudo chown -R jellyfin:jellyfin /data
sudo chmod -R 755 /data

或把用户加入组:

sudo usermod -aG jellyfin 你的用户

五、硬件转码(可选,提升性能)

Intel 核显

sudo yum install -y intel-media-driver

Web → 控制台 → 播放 → 硬件加速:VA-API

NVIDIA

# 安装官方驱动 + nvidia-container

Web → 硬件加速:NVENC


六、反向代理(nginx,可选)

server {
    listen 80;
    server_name jellyfin.example.com;

    location / {
        proxy_pass http://127.0.0.1:8096;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

七、常见问题

1. 页面打不开

  • 检查防火墙
  • 检查 systemctl status jellyfin
  • 看日志:
journalctl -u jellyfin -f

2. 扫描不到媒体

  • 权限问题(90%)
  • 路径写错

3. CentOS 8 已停更

建议用 Rocky / Alma / CentOS Stream


如果你愿意,我可以:

  • 给你 docker 版 Jellyfin
  • 帮你做 外网访问 + HTTPS
  • 针对 NAS / 树莓派 / 低配服务器优化

直接说你的使用场景即可。

0