本文资源都来源网络只是整合修改
家里使用PC搭建了NAS配置N3160低功耗U 8快8TBSAS硬盘 平时使用频率并不是很高出于对数据的保护和节能的目的将私有云盘及私人音乐服务器迁移至ARM ubuntu上
arm ubuntu 使用M301H 刷写最新64位系统 外置硬盘使用3.5寸硬盘盒加2TB希捷硬盘 电源使用12V3A 1拖2 5.5MM适配器 经过测试盒子加硬盘盒满载14W 待机2W左右
私有云请参照论坛里可道云的安装此处不在重复下面开始Navidrome安装
1.新建一个组和用户用来运行Navidrome,官方不推荐使用root用户运行Navidrome
groupadd -r navidrome 创建组
useradd -r -g navidrome -s /sbin/nologin -M -c "Navidrome Daemons" navidrome 创建用户
- 创建Navidrome的安装目录与运行目录。
install -d -o navidrome -g navidrome /opt/navidrome 安装目录
install -d -o navidrome -g navidrome /var/lib/navidrome 运行目录
3.从github下载Navidrome最新的二进制文件,重命名为Navidrome.tar.gz解压至安装目录并且设置运行权限。
https://github.com/navidrome/navidrome/releases github地址
下面是下载地址清按需下载 我刷了64位系统使用arm64 其他的清按需下载
https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_arm64.tar.gz
https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_armv7.tar.gz
https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_armv6.tar.gz
https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_armv5.tar.gz
https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_i386.tar.gz
https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_x86_64.tar.gz
https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_macOS_x86_64.tar.gz
https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Windows_i386.zip
https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Windows_x86_64.zip
sudo tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ 解压文件
sudo chown -R navidrome:navidrome /opt/navidrome 给与权限
创建Navidrome的配置文件
https://www.navidrome.org/docs/usage/configuration-options/ 官方给出的配置文件可用选项vim /var/lib/navidrome/navidrome.toml 创建编辑
MusicFolder = "<library_path>" 文件内容<library_path>修改为音乐文件存放路径
如果家里有IPV6可添加大于10000以上端口并在路由器上放开对应IPV6端口可实现直接远程连接
port = "32400" 此项不是必须因我使用PLEX路由器以开放32400端口 如无此项默认使用4533端口
- 创建启动服务项目
vim /etc/systemd/system/navidrome.service 创建编辑
下为内容
[Unit] Description=Navidrome Music Server and Streamer compatible with Subsonic/Airsonic After=remote-fs.target network.target AssertPathExists=/var/lib/navidrome [Install] WantedBy=multi-user.target [Service] User=navidrome Group=navidrome Type=simple ExecStart=/opt/navidrome/navidrome --configfile "/var/lib/navidrome/navidrome.toml" WorkingDirectory=/var/lib/navidrome TimeoutStopSec=20 KillMode=process Restart=on-failure #See https://www.freedesktop.org/software/systemd/man/systemd.exec.html DevicePolicy=closed NoNewPrivileges=yes PrivateTmp=yes PrivateUsers=yes ProtectControlGroups=yes ProtectKernelModules=yes ProtectKernelTunables=yes RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 RestrictNamespaces=yes RestrictRealtime=yes SystemCallFilter=~@clock @debug @module @mount @obsolete @"reboot"#42 @setuid @swap ReadWritePaths=/var/lib/navidrome # You can uncomment the following line if you're not using the jukebox This # will prevent navidrome from accessing any real (physical) devices #PrivateDevices=yes # You can change the following line to `strict` instead of `full` if you don't # want navidrome to be able to write anything on your filesystem outside of # /var/lib/navidrome. ProtectSystem=full # You can comment the following line if you don't have any media in /home/*. # This will prevent navidrome from ever reading/writing anything there. #ProtectHome=true
- 更新并启动Navidrome
systemctl daemon-reload 更新服务列表
systemctl start navidrome.service 启动服务
systemctl status navidrome.service 查看服务状态
如出现 Active: active (running) 服务以启动
使用 ip:4533 访问服务器
一切正常以后添加开启启动服务
sudo systemctl enable navidrome.service
支持应用
iOS:play:Sub、 substreamer、 Amperfy和 iSub
安卓:DSub, Subtracks, substreamer, Ultrasonic和 Audinaut
网络:Subplayer、 Airsonic Refix、 Aurial、 Jamstash和 Subfire
桌面:Sublime Music (Linux) 和Sonixd (Windows/Linux/macOS)
CLI:Jellycli (Windows/Linux) 和STMP (Linux/macOS)
连接的扬声器:
Sonos: bonob Alexa:AskSonic
其他:
Subsonic Kodi 插件、 Navidrome Kodi 插件、 HTTP目录文件系统
如果是MP3 之类不需要解码可直接使用 如果遇到其它格式播放器无法识别需要转码的需要ffmpeg 下为安装步骤
安装依赖库
apt-get update
apt-get -y install \
autoconf \
automake \
build-essential \
cmake \
git-core \
libass-dev \
libfreetype6-dev \
libgnutls28-dev \
libmp3lame-dev \
libsdl2-dev \
libtool \
libva-dev \
libvdpau-dev \
libvorbis-dev \
libxcb1-dev \
libxcb-shm0-dev \
libxcb-xfixes0-dev \
meson \
ninja-build \
pkg-config \
texinfo \
wget \
yasm \
zlib1g-dev \
libunistring-dev安装ffmpeg
apt install ffmpeg验证安装
ffmpeg –version出现下面提示表示安装完成
ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 9 (Ubuntu 9.4.0-1ubuntu120.04.1)
configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Subscribe by Email
Follow Updates Articles from This Blog via Email
No Comments