HOWTO install Subsonic on QNAP NAS (x86 based)

Tutorials, tips and tricks.

Moderator: moderators

HOWTO install Subsonic on QNAP NAS (x86 based)

Postby L4ngley » Thu May 14, 2009 9:12 pm

1 Download the WAR version of subsonic (NOT 3.7beta1)
http://subsonic.sourceforge.net/download.php

2 Download and Install Java - JDK QPG
http://www.qnap.ch/downloads/2009/qpkg/230309/Java-SDK_1.6.0_12.zip

3 Download and Install the Apache-Tomcat QPKG
http://www.qnap.ch/downloads/2009/qpkg/230309/apache-tomcat_6.0.18_x86.zip


You install these by loging into the NAS web admin page.
Then go to, System Tools -> QPKG -> Browse and upload the packages.
First "Java - JDK QPG" then "Apache-Tomcat"

I did a reboot of the NAS between the instals. (dont know if it matters)

The apache-tomcat needs to be enabeled, you do this also under the QPKG menu. Click apache-tomcat and the options wil be visible.

When it is enabled you can navigate to yor apache-tomcat page. (There is a link on the QPKG page to tomcat-apache.)

When you are on the Apache Tomcat page you go to :
-> Tomcat Manager
-> Scroll down and find the "WAR file to deploy" and brows to the downloaded war file and click Deploy.

Now you wil see /subsonic under Applications, click on it.

Thats it. No code to modify it just works :)

Remember there is a bug with the 3.7 beta1. Use the 3.6 version until the 3.7 is fixed.


Step 2 and 3 are borrowed from:
http://forum.qnap.com/viewtopic.php?f=44&t=12699

L4ngley
L4ngley
 
Posts: 27
Joined: Mon Feb 09, 2009 5:18 pm

Postby benje101 » Mon Jun 14, 2010 3:33 pm

hi L4ngley and anyone else that may have a clue on this..


....but would a similar setup be possible on an arm based (QNAP TS-410) nas
also.. ??

i'm sure i've heard of a sun JRE (SE?) for arm a while ago(i think!), i don't even have a clue re tomcat/apache

(unfortunatley i'm a biological rather than a computer scientist, so anything vaguely complicated technology wise i only get done through googling forums, trial and error, and some kind of self-destructive determination/madness :-)

thanks for any replies.
feel free to PM me or preferably even, email me at benje101@gmail.com

ben
thankyou all freeware developers!
benje101
 
Posts: 7
Joined: Mon Jun 14, 2010 3:12 pm

Config-files write-protected

Postby sofisten » Mon Jul 12, 2010 10:54 am

Hi,
I followed the guide, and it worked fine during installation...

But when i reboot the QNAP (TS509) all config I've done in SubSonic is lost.
I've tried to give the tomcat-user full rights over the \var\subsonic folder. I've also confirmed that changes in Subsonic config are written to the \var\subsonic\subsonic.proberties. But both the security rights and the subsonic.proberties are put back during reboot.

Any tips?

// Stig
sofisten
 
Posts: 13
Joined: Tue Nov 25, 2008 5:53 pm
Location: Bergen, Norway

Re: Config-files write-protected

Postby redranger » Fri Aug 20, 2010 8:35 am

sofisten wrote:Hi,
I followed the guide, and it worked fine during installation...

But when i reboot the QNAP (TS509) all config I've done in SubSonic is lost.
I've tried to give the tomcat-user full rights over the \var\subsonic folder. I've also confirmed that changes in Subsonic config are written to the \var\subsonic\subsonic.proberties. But both the security rights and the subsonic.proberties are put back during reboot.

Any tips?

// Stig


Hi Stig,

Did you find a solution to this, I have the same experience. When I restart the QNAP the settings are reset.

Thanks.
Thank you for your help.
Regards!
/Redranger
redranger
 
Posts: 30
Joined: Thu Aug 19, 2010 7:04 pm
Location: Denmark

Installing on QNAP T-419

Postby elango » Fri Sep 17, 2010 5:47 am

Is there anyway to get subsonic installed on QNAP x19 series? These have ARM processors instead of INTEL and there is no JAVA/Tomcat versions for these processors. I'm stuck.

If you can help on how I can get this installed on ARM processor servers, that'd be greatly helpful.

Thanks.
elango
 
Posts: 1
Joined: Fri Sep 17, 2010 5:45 am

How to redirect subsonic.properties and /var/subsonic

Postby sofisten » Sat Nov 06, 2010 8:01 am

I found a solution to this, sorry for not coming back to you sooner. This is what i did:

First I copied the content of "/var/subsonic" to "/share/MD0_DATA/subsonic".

Then I edited the tomcat startup script, located at "/share/MD0_DATA/.qpkg/Tomcat/tomcat.sh".

After "### END INIT INFO" I added the following lines:

### Create Subsonic link in /var
cd /var
ln -s /share/MD0_DATA/subsonic /var/subsonic
### End of Subconic link creation


This will create a link in "/var" that redirects "/var/subsonic" to "/share/MD0_DATA/subsonic" where I have placed my subsonic config. By adding this at the top of the tomcat.sh, I'm sure that the link is created before the tomcat and subsonic services starts.

I've upgraded both subsonic and the QNAP firmware and this works fine. I've not upgraded the tomcat server yet. It's possible the tomcat.sh then gets replaced, but then it's just to add the create link part again.


// Stig
sofisten
 
Posts: 13
Joined: Tue Nov 25, 2008 5:53 pm
Location: Bergen, Norway

Postby evoss » Sat Nov 06, 2010 10:02 pm

Hi

Im not having "/share/MD0_DATA/"

It is "/share/HDx/ " x=ABCDEFGHE and so ....

what shall i do ?

Regards
Evoss
evoss
 
Posts: 11
Joined: Thu Nov 19, 2009 3:45 pm

Postby zekebgaf@gmail.com » Mon Nov 08, 2010 11:17 pm

@elango: you are correct. It is not possible until there is a JAVA/Tomcat port for ARM cpu's.

@evoss:
follow sofisten's advice but use:

### Create Subsonic link in /var
cd /var
ln -s /share/HDA_DATA/subsonic /var/subsonic
### End of Subconic link creation

instead. I issued these commands from a bash prompt manually and have had my Subsonic server running and keeping settings across several reboots, but have not done any firmware or Tomcat updates yet.

Once you do this your VAR directory may look like this:

###############
[/var] # ls
MacAddress ledvalue playlists@ state/
browse.dat lib/ proftpd/ subsonic@
ddns_tmp.conf lock/ proftpd.pid target/
default log/ run@ tmp@
hw_serial_number pcmcia@ spool@ twonkymedia@
###############

The @ symbol means the subsonic 'folder' is a link.

If you want to do any transcoding, you will also need to install and configure LAME. Excerpting & expanding from another post I made:

My linked /var/subsonic is located at /share/HDA_DATA/subsonic/

1) Install LAME. I installed the ipkg qpkg then

# ipkg install lame

I did this since there is no qpkg for lame or other encoders.

This installed the LAME libraries into /opt/lib

2) Map the LAME installation to the HDA_DATA location:
# ln -s /opt/bin/lame /share/HDA_DATA/subsonic/transcode/lame

I then restarted tomcat:

#/etc/init.d/tomcat.sh restart

And transcoding worked (although I do have some as-of-yet unfixed issues when streaming flac and m4a with the iPhone iSub client over 3G (but not wifi)).

I did a similar thing for ffmpeg and flac. My folder structure looks like:

######################
[/share/HDA_DATA/subsonic] # ls
db/ subsonic.log* subsonic10.index*
playlists/ subsonic.properties* thumbs/
subsonic@ subsonic.sh* transcode/
[/share/HDA_DATA/subsonic] # cd ./transcode
[/share/HDA_DATA/subsonic/transcode] # ls
ffmpeg@ flac@ lame@
#######################

prerequisite: you will need to enable SSH (port 22) connection and connect with a terminal program like puTTy using your root/administrator user ID.
zekebgaf@gmail.com
 
Posts: 7
Joined: Sat Oct 02, 2010 3:21 pm

Re: HOWTO install Subsonic on QNAP NAS (x86 based)

Postby MountainX » Wed Feb 22, 2012 7:36 pm

What is the least expensive easy NAS to use for Subsonic? The installation must be easy! ;)

from the OP, I see that installation "for the ARM system is more complicated." Therefore, I don't believe I want to go with an ARM system. Can anyone recommend the least expensive NAS that has a good installation guide and will work with L4ngley's QPKG? Thanks
MountainX
 
Posts: 3
Joined: Wed Feb 22, 2012 5:14 am


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 4 guests