[Tutorial] How To Install MadSonic on FreeNas 8.3.1 release

Frequently asked questions. Tutorials, tips and tricks.

[Tutorial] How To Install MadSonic on FreeNas 8.3.1 release

Unread postby ForSSux » 03 Apr 2013, 12:40

Hi There,

I'm working as a sound engineer in the Belgian army...We have our own communications department.
At the video department we have 5 Avid stations that uses "Library Music" to enhance the viewing experience.

Our "Library Music" publisher mostly visit us once a year to upgrade ( add ) music.
We have several of these fine publisher ...www.sonofind.com..is one Universal is another.
They tend to do of course things a little different.
Anyway enough with the chit chat.

Tech Spec
Old Avid Unity chassis HP 8200xw Motherboard with 8GB ram and 16 disk each 160 GB running a zfs pool
I opted for FreeNas 8.3.1 release. We have over 500k of songs

I have installed subsonic on it from here http://forums.freenas.org/showthread.ph ... nic-Plugin from Joshua Parker thanks for this.
And learned a lot from here http://www.parmeter.net/ben/2011/02/02/ ... tructions/
After running this I quickly learned that although a great program, I needed tag search and here begins the MusicCabinet later followed by the Madsonic story which to choose is still difficult.

1) Requierments:
a) a jail setup as described here:
http://doc.freenas.org/index.php/Plugins

b) DNS check like the one from google 8.8.8.8
In the main one can do it via the webpage "Horizontal Network tab and in Global Configuration choose nameserver 1 and fill 8.8.8.8 and/or nameserver 2 8.8.4.4
The attachment freenasDNS.PNG is no longer available


c) a mount point for your media
The attachment freenasMountpoints.PNG is no longer available



No Original subsonic is required to run MusicCabinet !!!!!!

2) Remove or make the jail
a) create two datasets in your ZFS pool
freenasMountpoints.PNG


b) upload the FreeNAS-8.3.1-RELEASE-x64.Plugins_Jail.pbi
freenasDNS.PNG


c) make sure the plugin service is active
freenaspluginssettings.PNG


now to be on the safe side ...the web page doesn't always tells the truth.
Go to the shell and type

[root@freenas ~]# jls
JID IP Address Hostname Path
1 - software /mnt/DGCOM-Music/jail/software
voila the jail is running and has a JIS of 1

d) make sure you can search the jail
[root@freenas ~]#jexec 1 /bin/tcsh
software# /usr/libexec/locate.updatedb

3) Installing MadSonic in the jail.
a) open the jail

[root@freenas ~]# jls
JID IP Address Hostname Path
1 - software /mnt/DGCOM-Music/jail/software
voila the jail is running and has a JIS of 1 your milage may vary on the JID and software

okay open the jail with:
[root@freenas ~]# jexec 1 /bin/tcsh
software#

The software# is the name of my jail and may be different for you

b) install dependencies in the jail

software# pkg_add -v -r openjdk7



c) installing Madsonic

download the stand allone version here viewforum.php?f=17 take the standalone version unzip it and rename the folder to standalone and move it to your share, mine is /mnt/DGCOM-Music
software# mkdir /var/subsonic
software# cp r /mnt/DGCOM-Music/standalone /var/subsonic

some of us will have to do a: chmod 777 *.*


d) adapt some variables here and there

software# vi /etc/hosts
change this line 127.0.0.1 localhost localhost.my.domain
to 127.0.0.1 localhost localhost.my.domain software

software# vi /var/subsonic/standalone/subsonic.sh

SUBSONIC_HOME=/var/subsonic
SUBSONIC_HOST=192.168.1.66 # my jail has ip 192.168.1.66 yours?
SUBSONIC_PORT=4040
SUBSONIC_HTTPS_PORT=0
SUBSONIC_CONTEXT_PATH=/
SUBSONIC_MAX_MEMORY=450 # with over +500k of songs I had a little more then 2GB ram necessary
SUBSONIC_PIDFILE=
SUBSONIC_DEFAULT_MUSIC_FOLDER=/media
SUBSONIC_DEFAULT_PODCAST_FOLDER=/media
SUBSONIC_DEFAULT_PLAYLIST_FOLDER=/media

where is it:

cd /var/subsonic/standalone
#if [ -L $0 ] && ([ -e /bin/readlink ] || [ -e /usr/bin/readlink ]); then
#cd $(dirname $(readlink $0))
#fi

for the java

if [ -e "${JAVA_HOME}" ]
then
JAVA=/usr/local/openjdk7/bin/java
fi

4) adapt startup script


madsonic auto startup script somebody?

5) test your Madsonic

[root@freenas ~]# jexec 1 /bin/tcsh
software# cd /var/subsonic/standalone
software# ./subsonic.sh
Started Subsonic [PID 5613, /var/subsonic/subsonic_sh.log]

write down the pid number 5613

8) transcoding

I didn't need this so this is a 1/1 copy of http://www.parmeter.net/ben/2011/02/02/ ... tructions/

mkdir /var/subsonic/transcode
cp /usr/local/bin/lame /var/subsonic/transcode/
cp /usr/local/bin/flac /var/subsonic/transcode/
cp /usr/local/bin/ffmpeg /var/subsonic/transcode/

Configure your transcoder settings. In the Subsonic web interface go to “Settings > Transcoding”.

In this example, I’ve set up FLAC to transcode to WAV, then to MP3. On the line reads “flac > mp3″ modify the following:

Step 1 = flac -c -s -d %s
Step 2 = lame -b 192 – -


Kind Regards and thanks for reading
Guy Forssman
ForSSux
Contributor
Contributor
 
Posts: 34
Joined: 02 Apr 2013, 14:07
Has thanked: 27 times
Been thanked: 19 times

Re: How To Install MadSonic on FreeNas 8.3.1 release

Unread postby sebile » 01 May 2013, 15:55

my startup script for subsonic (placed in /usr/local/etc/rc.d)

Code: Select all
#!/bin/sh
#
# PROVIDE: subsonic
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# subsonic_enable (bool):   Set to NO by default.
#            Set it to YES to enable it.

. /etc/rc.subr

name="subsonic"
rcvar=${name}_enable
subsonic_enable=${subsonic_enable-"NO"}
pidfile="/var/run/${name}.pid"
procname="/usr/local/openjdk7/bin/java"

start_cmd="subsonic_start"

start_precmd="rm -f $pidfile"
stop_postcmd=$start_precmd

subsonic_start()
{
   echo "Starting Subsonic"
   export PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin
   cd /var/subsonic/standalone
   sh subsonic.sh
}


load_rc_config $name
run_rc_command "$1"
sebile
 
Posts: 1
Joined: 01 May 2013, 15:27
Has thanked: 0 time
Been thanked: 2 times


Return to Info

Who is online

Users browsing this forum: No registered users and 1 guest