23-01-2016, 17:52
Introduction
FreeNAS is a free and open-source solution for building a NAS yourself on commodity hardware. It's based on FreeBSD as the OS and ZFS as the filesystem.
MinimServer is a new UPnP AV music server with a number of innovative features that make it easier to organize and explore your music collection.
MinimServer does not come readily packaged for FreeNAS, but with a few steps it can be achieved that it runs properly within a jail on the system.
Details of investigations about this can be read here and here, but I recommend you save your time and just follow the instructions below.
I sum up the steps needed for MinimServer on FreeBSD here:
In the future it might become necessary to repeat the replacement of the zip-file (steps 7 & 8) again because of future updates. Just remember that when MinimServer suddenly stops working that this might be the case. In these cases, you will find an error-message in the log similar like this:
Note: At the moment, the libraries are provided for 64-bit architecture only. These files will not work if used on a 32-bit OS (you can check with "uname -a").
Good luck and have fun with MinimServer!
FreeNAS is a free and open-source solution for building a NAS yourself on commodity hardware. It's based on FreeBSD as the OS and ZFS as the filesystem.
MinimServer is a new UPnP AV music server with a number of innovative features that make it easier to organize and explore your music collection.
MinimServer does not come readily packaged for FreeNAS, but with a few steps it can be achieved that it runs properly within a jail on the system.
Details of investigations about this can be read here and here, but I recommend you save your time and just follow the instructions below.
I sum up the steps needed for MinimServer on FreeBSD here:
- Prepare a jail within FreeNAS as usual. Ensure the jail can connect to the internet.
- Install dependencies within jail: multimedia/ffmpeg, java/openjdk8-jre, ftp/wget, lang/gcc
- Create storage-link between your folder with your music and /media within the jail.
- Download MinimServer for Linux Intel and place it in /usr/local/share within the jail.
- Change to /usr/local/share and extract the software:
Code:
tar -xvzf MinimServer-<version-you-downloaded>-linux-intel.tar.gz
- Download the libs from here (it contains the ohnet-libraries MinimServer needs, specifically compiled for FreeBSD) and place it in /usr/local/share within the jail.
- Now search for zip-files within the path of minimserver in the jail:
Code:
find /usr/local/share/minimserver -name "*.zip"
- Replace that file with the previously downloaded file, using exactly the filename of the existing variant of the installation of MinimServer.
- Start Minimserver with "minimserver/bin/startc".
- Depending on the exact version installed, it might start normally like this:
Code:
root@jail:/usr/local/share # minimserver/bin/startc
MinimServer 2.0.16 update 185, Copyright (c) 2012-2021 Simon Nash. All rights reserved.
starting MinimServer[jail]
Enter command (? for help):
>Enter content directory, or null to continue:
# - After entering the path "/media" and pressing enter, MinimServer should scan your media and start. You can check the status of the server via a Webbrowser pointing to the ip of the jail and port 9790, for example http://192.168.0.32:9790/ You can rescan the library there. For full functionality install MinimWatch on your PC and control MinimServer through that.
- Note: If the downloaded version is not the latest one, it will update itself and then crash (!). This might also happen at a later time, when new updates of the software are released.
- If this happens: Repeat steps 7 & 8. This is necessary because the update-procedure has yet added another updated but incompatible zip-file with a new, higher version-number. It has to be replaced another time.
- Execute this command:
Code:
/usr/bin/sed -i -- 's/-eo pid,user,vsz,stat,args/-exo pid,user,vsz,stat,args/g' /usr/local/share/minimserver/bin/stopall
- Create the file /etc/rc.d/minimserver with the following contents:
Code:
#!/bin/sh
#
# $FreeBSD: /usr/local/etc/rc.d/minimserver, 2020/02/03 05:55:56 isaac Exp $
#
# PROVIDE: minimserver
# KEYWORD: FreeBSD
#
# minimserver startup
#
. /etc/rc.subr
minimserver_enable=${minimserver_enable}
minimserver_flags=${minimserver_flags}
name=minimserver
rcvar=minimserver_enable
minimserver_path=/usr/local/share/minimserver
start_cmd=minimserver_start
stop_cmd=minimserver_stop
minimserver_start() {
PATH=${PATH}:/usr/local/sbin:/usr/local/bin
export PATH
LANG=en_US.UTF-8
export LANG
LC_CTYPE=en_US.UTF-8
export LC_CTYPE
LC_ALL=en_US.UTF-8
export LC_ALL
checkyesno minimserver_enable && echo "Starting minimserver." && \
${minimserver_path}/bin/startd ${minimserver_flags}
}
minimserver_stop() {
checkyesno minimserver_enable && echo "Stopping minimserver." && \
${minimserver_path}/bin/stopall
}
load_rc_config ${name}
run_rc_command "$1" - Make the file executable with "chmod +x minimserver"
- Execute this command:
Code:
sysrc minimserver_enable="YES"
- You can now start the server in the background with "service minimserver start" or by just restarting the jail or FreeNAS itself.
In the future it might become necessary to repeat the replacement of the zip-file (steps 7 & 8) again because of future updates. Just remember that when MinimServer suddenly stops working that this might be the case. In these cases, you will find an error-message in the log similar like this:
Code:
>java.lang.UnsatisfiedLinkError: /usr/local/minimserver/data/native/libohNet.so: Shared object "libm.so.6" not found, required by "libohNet.so"
Note: At the moment, the libraries are provided for 64-bit architecture only. These files will not work if used on a 32-bit OS (you can check with "uname -a").
Good luck and have fun with MinimServer!