117.info
人生若只如初见

jellyfin在ubuntu上的安装步骤

在Ubuntu上安装Jellyfin媒体服务器的步骤如下:

安装Jellyfin的步骤

  1. 更新系统并安装必要的包
sudo apt update
sudo apt upgrade
  1. 安装Docker(如果打算使用Docker来运行Jellyfin):
# 安装必要的依赖
sudo apt install apt-transport-https ca-certificates curl software-properties-common

# 添加 Docker 的GPG 密钥
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

# 添加 Docker 的稳定版仓库
sudo add-apt-repository "deb [archamd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

# 更新软件包索引并安装 Docker
sudo apt update
sudo apt install docker-ce

# 启动 Docker 并设置为开机自启
sudo systemctl start docker
sudo systemctl enable docker
  1. 安装Jellyfin
sudo apt install jellyfin -y
  1. 验证Jellyfin服务
sudo systemctl status jellyfin
  1. 管理Jellyfin服务
  • 启动Jellyfin:
sudo systemctl start jellyfin
  • 停止Jellyfin:
sudo systemctl stop jellyfin
  • 重启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 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 you_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地址:


    ServerName your_domain
    Redirect permanent / https://your_domain/
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined



    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/"

  1. 重启Apache
sudo systemctl restart apache2
  1. 访问Jellyfin

在浏览器中访问 http://your_domain:8096,你将看到Jellyfin的界面。

请注意,以上步骤是基于Ubuntu系统的标准安装流程,具体操作可能会因系统版本或特定需求而有所不同。在安装过程中,请确保遵循相关的安全指南和最佳实践。

未经允许不得转载 » 本文链接:https://www.117.info/ask/fedcbAzsKBwJSDVY.html

推荐文章

  • ubuntu中selinux日志在哪看

    在Ubuntu中,SELinux(Security-Enhanced Linux)日志的查看方法如下:
    查看SELinux状态
    首先,您可以通过查看配置文件来确定SELinux是否已启用以及其...

  • Ubuntu挂载加密分区步骤

    在Ubuntu系统中挂载加密分区的步骤如下:
    安装cryptsetup工具
    首先,确保已经安装了cryptsetup工具。如果没有安装,可以使用以下命令进行安装:
    ...

  • Ubuntu iptables如何使用脚本

    在Ubuntu系统中,iptables是一个用于配置Linux内核防火墙的命令行工具。你可以编写脚本来自动化iptables规则的添加、删除和修改。以下是一些基本步骤和示例,帮助...

  • 如何优化Ubuntu上FileZilla性能

    要优化Ubuntu上FileZilla的性能,可以从以下几个方面入手:
    优化FileZilla Server设置 增加最大同时传输数:在FileZilla Server中,默认允许同时进行两次传...

  • 如何通过Apache配置实现防盗链

    防盗链(Hotlink Protection)是一种防止其他网站直接链接到你的服务器上的资源(如图片、视频、CSS、JavaScript等),从而节省带宽和保护资源的技术。通过Apach...

  • CentOS C++性能瓶颈在哪

    在CentOS系统上,C++程序的性能瓶颈可能出现在多个方面。以下是一些常见的性能瓶颈及其可能的原因: CPU瓶颈: 程序中的计算密集型任务可能导致CPU使用率接近或达...

  • Debian Sniffer如何分析数据

    Debian Sniffer 并不是一个专门用于数据分析的工具,而是一个网络流量分析工具,通常用于捕获和分析网络数据包。如果你想要进行数据分析,可能需要结合其他工具和...

  • 如何使用mount命令挂载文件系统

    mount 命令用于将文件系统挂载到 Linux 系统的目录结构中。以下是使用 mount 命令挂载文件系统的基本步骤: 确定设备名称: 首先,你需要知道要挂载的设备名称。...