溫馨提示×

jellyfin支持哪些ubuntu系統

小樊
54
2025-03-08 22:49:27
欄目: 智能運維

Jellyfin是一個開源的媒體服務器軟件,它支持多種Linux發行版,包括Ubuntu。具體來說,Jellyfin可以在Ubuntu 20.04及更高版本上運行。以下是在Ubuntu上安裝Jellyfin的詳細步驟:

安裝步驟

  1. 更新系統并安裝必要的包
sudo apt update
sudo apt install apt-transport-https ca-certificates gnupg curl
  1. 創建Jellyfin GPG密鑰
mkdir -p /etc/apt/keyrings
curl -fsSL https://repo.jellyfin.org/jellyfin_team.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/jellyfin.gpg
  1. 添加Jellyfin倉庫

對于Ubuntu 20.04及更高版本:

echo "deb [arch=$(dpkg --print-architecture)] https://repo.jellyfin.org/ubuntu $(lsb_release -c -s) main" | sudo tee /etc/apt/sources.list.d/jellyfin.list

對于Ubuntu 18.04:

echo "deb [arch=amd64] https://repo.jellyfin.org/ubuntu bionic main" | sudo tee /etc/apt/sources.list.d/jellyfin.list
  1. 更新包列表
sudo apt update
  1. 安裝Jellyfin
sudo apt install jellyfin -y
  1. 驗證Jellyfin服務
sudo systemctl is-enabled jellyfin
sudo systemctl status jellyfin
  1. 管理Jellyfin服務

啟動、停止、重啟Jellyfin服務:

sudo systemctl start jellyfin
sudo systemctl stop jellyfin
sudo systemctl restart jellyfin
  1. 配置防火墻(可選):
sudo apt install ufw -y
sudo ufw allow OpenSSH
sudo ufw enable
sudo ufw allow "WWW Full"
sudo ufw status
  1. 安裝Apache和Certbot(可選,用于SSL配置):
sudo apt install apache2 certbot python3-certbot-apache -y
sudo systemctl is-enabled apache2
sudo systemctl status apache2
sudo a2enmod proxy proxy_http ssl proxy_wstunnel remoteip http2 headers
sudo systemctl restart apache2
  1. 設置Apache作為反向代理

創建Jellyfin的web根目錄并設置權限:

sudo mkdir -p /var/www/html/jellyfin/public_html
sudo chown -R www-data:www-data /var/www/html/jellyfin/public_html

使用Certbot為你的域名獲取SSL證書:

sudo certbot certonly --agree-tos --email your_email@gmail.com --no-eff-email --webroot -w /var/www/html -d your_domain

創建一個新的Apache虛擬主機配置文件:

sudo nano /etc/apache2/sites-available/jellyfin.conf

插入以下配置,根據需要更改域名、SSL證書路徑和服務器IP地址:

<VirtualHost *:80>
    ServerName your_domain
    # Comment to prevent HTTP to HTTPS redirect
    Redirect permanent / https://your_domain/
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

<VirtualHost *:443>
    ServerName your_domain
    DocumentRoot /var/www/html/jellyfin/public_html
    ProxyPreserveHost On
    ProxyPass "/.well-known/" "!"
    RequestHeader set X-Forwarded-Proto "https"
    RequestHeader set X-Forwarded-Port "443"
    ProxyPass "/socket" "ws://0.0.0.0:8096/socket"
    ProxyPassReverse "/socket" "ws://0.0.0.0:8096/socket"
    ProxyPass "/" "http://0.0.0.0:8096/"
    ProxyPassReverse "/" "http://0.0.0.0:8096/"
    IfModule mod_ssl.c
        SSLEngine on
        SSLCertificateFile /path/to/your/certificate.crt
        SSLCertificateKeyFile /path/to/your/private.key
        SSLCertificateChainFile /path/to/your/chainfile.crt
    </VirtualHost>
  1. 啟用Apache虛擬主機
sudo a2ensite jellyfin.conf
sudo systemctl reload apache2

完成以上步驟后,你就可以在Ubuntu系統上成功安裝并運行Jellyfin媒體服務器了。

0
亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女