在CentOS上配置Jellyfin的端口,可以通过以下步骤进行:
/etc/jellyfin/jellyfin.conf 或 /opt/jellyfin/conf/jellyfin.conf。nano 或 vim)打开配置文件。[Server] 部分,或者直接搜索 http_port 或 https_port。http_port 的值更改为你想要的端口号(例如 8096)。https_port 的值,并确保你有相应的SSL证书。示例配置:
[Server]
http_port = 8096
https_port = 8443
保存并退出编辑器。
重启Jellyfin服务:
sudo systemctl restart jellyfin
如果你不想直接修改配置文件,也可以通过设置环境变量来指定端口。
/etc/systemd/system/jellyfin.service 或 /usr/lib/systemd/system/jellyfin.service。[Service] 部分添加以下行:Environment="JELLYFIN_HTTP_PORT=8096"
Environment="JELLYFIN_HTTPS_PORT=8443"
sudo systemctl daemon-reload
sudo systemctl restart jellyfin
通过以上任一方法,你应该能够成功配置Jellyfin在CentOS上的端口号。