在CentOS上安装Jellyfin媒体服务器的步骤如下:
sudo yum update -y
sudo yum install -y libicu fontconfig
Jellyfin需要FFmpeg来进行视频转码,因此需要安装FFmpeg的静态包。可以从John Van Sickle的网站下载静态编译的FFmpeg。
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/
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
sudo systemctl start jellyfin
sudo systemctl enable jellyfin
访问Jellyfin的Web界面(通常是 http://your_server_ip:8096
),按照提示完成初始化设置,包括选择语言、设置用户、添加媒体库等。
放行Jellyfin使用的端口(默认HTTP端口为8096,HTTPS端口为8920等):
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
如果上述步骤较为复杂,也可以考虑使用Docker来快速部署Jellyfin:
docker pull jellyfin/jellyfin:latest
mkdir -p /srv/jellyfin/{config,cache}
docker run -d --name myvideo -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
以上步骤应该能够帮助你在CentOS上成功安装和配置Jellyfin媒体服务器。如果在安装过程中遇到问题,可以参考Jellyfin的官方文档或相关社区论坛寻求帮助。