在CentOS上配置Jellyfin媒体服务器的步骤如下:
更新系统:
sudo yum update -y
安装依赖包:
sudo yum install -y libicu fontconfig
安装FFmpeg(如果使用RPM包安装):
wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz
tar -xvf ffmpeg-git-amd64-static.tar.xz
sudo cp ffmpeg-git-20200211-amd64-static/ffmpeg /usr/bin/
sudo cp ffmpeg-git-20200211-amd64-static/ffprobe /usr/bin/
使用RPM包安装:
sudo yum install -y epel-release
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 jellyfin-web-10.8.9-1.el7.noarch.rpm jellyfin-server-10.8.9-1.el7.x86_64.rpm jellyfin-10.8.9-1.el7.x86_64.rpm
使用Docker安装(可选):
sudo yum install -y docker
sudo systemctl start docker
sudo systemctl enable docker
docker pull jellyfin/jellyfin:latest
mkdir -p /srv/jellyfin/{config,cache}
docker run -d --name jellyfin -p 80:8096 --restart always --privileged true -v /srv/jellyfin/config:/config -v /srv/jellyfin/cache:/cache -v /path/to/your/media:/media jellyfin/jellyfin:latest
启动和启用Jellyfin服务:
sudo systemctl start jellyfin
sudo systemctl enable jellyfin
配置防火墙:
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
初始化Jellyfin:
配置SSL(可选):
sudo yum install -y certbot python3-certbot-nginx
sudo certbot --nginx -d your_domain
希望这些步骤能帮助你在CentOS上成功安装和配置Jellyfin媒体服务器。