在CentOS上安裝Jellyfin可以分為幾個步驟,包括安裝依賴、下載和安裝Jellyfin軟件包、配置防火墻以及初始化Jellyfin服務器。以下是詳細的安裝教程:
首先,需要安裝一些必要的依賴包,例如libicu
和fontconfig
:
sudo yum install -y libicu fontconfig
Jellyfin需要FFmpeg來進行視頻轉碼,因此需要安裝FFmpeg的靜態包??梢詮?a >John Van Sickle的網站下載靜態編譯的FFmpeg。
下載并解壓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/
配置環境變量:
echo 'export PATH="/usr/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
ffmpeg -version # 驗證安裝
可以從Jellyfin官方網站下載最新版本的Jellyfin RPM包。
下載所需的RPM包:
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
安裝Jellyfin:
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
啟動Jellyfin服務并設置為開機自啟動:
sudo systemctl start jellyfin
sudo systemctl enable jellyfin
檢查服務狀態:
sudo systemctl status jellyfin
放行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
訪問Jellyfin的Web界面(通常是http://YOUR_SERVER_IP:8096
),按照提示完成初始化設置,包括選擇語言、設置用戶、添加媒體庫等。
以上步驟應該可以幫助你在CentOS上成功安裝和配置Jellyfin媒體服務器。如果在安裝過程中遇到問題,可以參考Jellyfin的官方文檔或相關社區論壇尋求幫助。