• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Installing SubSonic 4.0.1 onto FreeNAS 0.7.1

Talderon

Android Expert
I originally posted this here: Subsonic Forum :: View topic - [HOW -TO] Install Subsonic 4.0.1 on FreeNAS 0.7.1 but wanted to share with others in case there are people that want to use this application. The android client works really well and my wife's iPhone works great with it too!

Installing SubSonic 4.0.1 onto FreeNAS 0.7.1

I found the initial guide on Subsonic.org forums, however, it was for an older version of FreeNAS and Subsonic, so I thought I would update things a little and see if this helps anyone out that is trying to get this going.

Few things to note:
1. I have hosted the files myself since this guide is meant for a specific versions of these packages. They were not easy to find so I wanted to make sure I could help out. I included MD5's for them files so you can check that they are untampered. :)
2. I cannot guarantee this will work with future versions of Subsonic or FreeNAS.
3. I offer no warranties on anything you do with this guide.
4. I have only done this on 32bit, have not tried, nor can I offer help on 64bit.
5. Credits: I used many scattered sources to get this all together and working, I can't recall all the sources, but THANKS FOR YOUR HELP!! Of course, thanks goes out to all the Dev's for Subsonic and FreeNAS. :)

PREPARATION

First of all, download all of the binaries that you will need:

Terminal app:

I suggest Putty, it's free, Google it.

OS:
FreeNAS 0.7.1 (32bit): Download FreeNAS from SourceForge.net

APP:
Subsonic 4.0.1 Standalone: Download subsonic from SourceForge.net

Packages:
Go here: FreeBSD Foundation Java Downloads
--Download: Diablo Latte JRE 1.6.0-7 FreeBSD 7.x/i386 End-User 27M diablo-jre-freebsd7.i386.1.6.0.07.02.tbz

javavmwrapper-2.3.2: http://dl.dropbox.com/u/3963477/FreeNAS/javavmwrapper-2.3.2.tbz
MD5: e640b74fa891e1a77e339c87e3879b02

xextproto-7.0.2: http://dl.dropbox.com/u/3963477/FreeNAS/xextproto-7.0.2.tbz
MD5: e2f6a3f9e4af171d827729ce0372ca46

xproto-7.0.10_1: http://dl.dropbox.com/u/3963477/FreeNAS/xproto-7.0.10_1.tbz
MD5: 6993357516d793e41eec42357ee4667c

xtrans-1.0.4: http://dl.dropbox.com/u/3963477/FreeNAS/xtrans-1.0.4.tbz
MD5: 58e5d17f49f83a2aae2953696e8e0c80

INSTALLATION

*Ok, now that is all downloaded, you will need to burn the FreeNAS ISO to a CD.
*Boot up the CD
*Once you get to the "Console setup" page, choose option 9) Install/Upgrade to hard drive/flash device, etc.
*On the "Install" screen, choose option 3) Install 'full' OS on HDD + DATA + SWAP partition
*Select the Source CD drive (acd0 for example if you have one ATA CDROM drive).
*Select the Destination HDD that you want to install and boot FreeNAS from (ad0 for example if you want to install it on the master hard drive on the ATA channel 1).
--Personally, I chose to use a 2GB Partition for FreeNAS so I can make sure I have room to expand (2048MB for those that need to know). Other partitions I left Default.
*In both cases, once FreeNAS is installed, follow the instructions, remove the CD and when the menu comes up again
*Pree ESC or select 'Exit' and enter to exit to the main menu
*Select 7 to reboot the computer.

At this point, you should be going straight into the FreeNAS main screen.

You will need to note the Interface IP Address and make sure it is set up correctly for your network.

Now that you have this installed, you will want to enable SSH onto your server so you can open a terminal window and do your work there rather than from the GUI, which is, at best, not easy for this kind of work.

http://<your-freenas-server>/ in your browser. This is displayed on the main screen of your FreeNAS terminal. If you need more help about this, google it. :)

Mouse over Access and click on Users and add yourself as a user:

Options are self explainatory, but set these:

Shell: bash
Primary group: admin

Click Save

Mouse over Services then click on SSH

Setup with the following:

TCP Port: 22
Permit Root Login: Checked
Password Authentication: Checked

Click Save and Restart

Wait for reboot to complete.

Upload the files:

Mouse over Advanced then click Command

Click on "Choose File" button and upload the packages and the app (listed above)

They will be uploaded to the server in /var/tmp/

SSH to your server:

UserID: root
Passwd: {admin password which you set when setting up FreeNAS}

cd /var/tmp
ls -l (to verify the files are uploaded)

Type the following commands one at a time:

pkg_add -v -r xtrans-1.0.4.tbz
pkg_add -v -r xproto-7.0.10_1.tbz
pkg_add -v -r xextproto-7.0.2.tbz
pkg_add -v -r javavmwrapper-2.3.2.tbz

Once those are installed, install the JRE:

pkg_add -v diablo-jre-freebsd7.i386.1.6.0.07.02.tbz

Hit enter for defaults and to scroll through the License Agreement.

Type yes and hit enter when asked if you agree.

Type the following to prepare to install Subsonic:

cd /var
mkdir subsonic
cd subsonic
mkdir standalone
cd standalone

Copy the install files to the new folder

mv /var/tmp/subsonic-4.0.1-standalone.tar.gz /var/subsonic/standalone/subsonic-4.0.1-standalone.tar.gz

Unpack the file:

tar vxfz subsonic-4.0.1-standalone.tar.gz

This should unpack the files here (/var/subsonic/standalone).

Backup one directory:

cd ..

Create the Transcoder directory:

mkdir transcode

Install the trasncoder packages:

pkg_add -v -r mac
pkg_add -v -r lame
pkg_add -v -r flac

NOTE: If you get an error with the LAME package download/install, use one of the following:

pkg_add -r -v http://ftp.urc.ac.ru/pub/OS/FreeBSD/packages-7/Latest/lame.tbz

or

pkg_add -r -v http://dl.dropbox.com/u/3963477/FreeNAS/lame.tbz
MD5: 9cddcbd38888647deb753993af306906

COPY (NOT move) them to the transcoder directory:

cp /usr/local/bin/lame /var/subsonic/transcode
cp /usr/local/bin/lame /var/subsonic/transcode
cp /usr/local/bin/lame /var/subsonic/transcode

Now to fix the startup script:

cd /var/subsonic/standalone
vi subsonic.sh

Here, you will want to delete or comment out the following lines:

cd $(dirname $0)
if [ -e /bin/readlink ] || [ -e /usr/bin/readlink ]; then
cd $(dirname $(readlink -f $0))
fi

You will in its place, add the following line:

cd `dirname $0`

Save and exit.

Start Subsonic on bootup:

In the FreeNAS web interface, go to System > Advanced > Command script and add the following "PostInit" script:

/var/subsonic/standalone/subsonic.sh

That's it! Done! Reboot to get it running and make sure it's all set.

Go to http://<your-freenas-server>:4040 to start using Subsonic.

Error logs are at:

/var/subsonic/subsonic_sh.log

I hope this helps!! Also, it's 2am here and I am waiting for UAT Testers to finish while I am writting this, so if there are any mistakes, mispellings or whatever, sorry about that, I'll try and edit this and keep it corrected.

Thanks again all!
 
Back
Top Bottom