如何在 Debian/Ubuntu 系 GNU/Linux 上搭建属于自己的音乐服务器

首先安装 openjdk-8-jre

sudo apt install openjdk-8-jre

下载 Subsonic 的安装包

wget https://s3-eu-west-1.amazonaws.com/subsonic-public/download/subsonic-6.1.6.deb
sudo dpkg -i subsonic-6.1.6.deb

为 Subsonic 添加非 root 用户

sudo useradd --system subsonic
sudo gpasswd -add subsonic subsonic

打开 Subsonic 配置文件并将 SUBSONIC_USER 中的变量修改为 subsonic

sudo nano /etc/default/subsonic

# Type "subsonic --help" on the command line to read an
# explanation of the different options.
#
# For example, to specify that Subsonic should use port 80 (for http)
# and 443 (for https), and use a Java memory heap size of 200 MB, use
# the following:
#
# SUBSONIC_ARGS="--port=80 --https-port=443 --max-memory=200"

SUBSONIC_ARGS="--max-memory=150"

SUBSONIC_USER=subsonic

重启 Subsonic 并设置开机自启

sudo service subsonic restart
sudo systemctl enbale subsonic

浏览器打开 127.0.0.1:4040,首次登陆的默认账号密码均为 admin

Subsonic first login

登录后点击 Set up media folders 设置你存放音乐的路径

Subsonic getting started

保存并点击 Scan media folder now

Subsonic folder setup


Copyright © 2022-2023 Lumorian. This page is licensed under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License.