在Ubuntu上配置Jellyfin的步骤如下:
1. 安装Jellyfin
方法一:使用Snap安装
- 打开终端。
- 运行以下命令来安装Jellyfin:
sudo snap install jellyfin --classic
方法二:使用APT仓库安装
- 更新APT包列表:
sudo apt update
- 添加Jellyfin的APT仓库:
sudo apt install software-properties-common sudo add-apt-repository ppa:jellyfin/stable sudo apt update
- 安装Jellyfin:
sudo apt install jellyfin
2. 配置Jellyfin
方法一:通过Web界面配置
- 打开浏览器,访问
http://
。:8096 - 使用默认用户名
admin
和密码admin
登录。 - 在Web界面中进行配置,包括:
- 设置管理员账户。
- 配置媒体库。
- 设置网络选项(如端口、SSL证书等)。
方法二:通过配置文件配置
- 打开Jellyfin的配置文件:
sudo nano /etc/jellyfin/config/config.yaml
- 根据需要进行配置,例如:
- 修改端口号:
httpPort: 8096
- 配置SSL证书路径:
httpsPort: 8443 httpsCertificatePath: /path/to/your/certificate.pem httpsPrivateKeyPath: /path/to/your/privatekey.pem
- 配置媒体库路径:
mediaDirectories: - /path/to/your/media
- 修改端口号:
3. 启动和停止Jellyfin服务
使用Snap安装
- 启动Jellyfin服务:
sudo snap start jellyfin
- 停止Jellyfin服务:
sudo snap stop jellyfin
使用APT仓库安装
- 启动Jellyfin服务:
sudo systemctl start jellyfin
- 停止Jellyfin服务:
sudo systemctl stop jellyfin
4. 设置开机自启动(可选)
使用Snap安装
- 启用Jellyfin的开机自启动:
sudo snap set jellyfin start-on-boot=true
使用APT仓库安装
- 启用Jellyfin的开机自启动:
sudo systemctl enable jellyfin
5. 配置防火墙(可选)
如果你的服务器启用了防火墙,确保开放Jellyfin使用的端口(默认是8096):
sudo ufw allow 8096/tcp
6. 访问Jellyfin
在浏览器中访问 http://
,你应该能够看到Jellyfin的登录界面。
通过以上步骤,你应该能够在Ubuntu上成功配置和运行Jellyfin。如果有任何问题,请参考Jellyfin的官方文档或社区支持。