| View previous topic :: View next topic |
| Author |
Message |
sindre_mehus

Joined: 29 Nov 2005 Posts: 1138 Location: Oslo, Norway
|
Posted: Tue Jan 13, 2009 5:49 pm Post subject: How to install Subsonic on FreeNAS |
|
|
This tutorial explains how to install Subsonic on the popular FreeNAS server.
The following was done with Subsonic 3.6 and FreeNAS 0.69. Note that a "full", not "embedded" FreeNAS installation is required. Make sure to allocate enough disk space on the OS partition. Java and Subsonic requires at least 150MB.
In terms of hardware requirements, you probably need at least 750MHz CPU and 180MB RAM.
Step 1: Download Java JRE (or JDK) package from http://www.freebsdfoundation.org/downloads/java.shtml
Step 2: Install dependent packages first:
| Code: | $ pkg_add -v -r xtrans
$ pkg_add -v -r xproto
$ pkg_add -v -r xextproto
$ pkg_add -v -r javavmwrapper
|
Step 3: Install the JRE (the .tbz file is the one you downloaded in step 1)
| Code: | | $ pkg_add -v diablo-jre-freebsd6.i386.1.6.0.07.02.tbz |
Step 4: Download Subsonic standalone version and install it in /var/subsonic/standalone, as described here.
Step 5: In the FreeNAS web interface, go to System > Advanced > Command script and add the following "PostInit" script:
| Code: | | /var/subsonic/standalone/subsonic.sh |
Step 6: Reboot FreeNAS, and go to http://<your-freenas-server>:8080 to start using Subsonic.
Your comments are welcome!
Last edited by sindre_mehus on Thu Jan 29, 2009 9:20 am; edited 1 time in total |
|
| Back to top |
|
 |
AndyD
Joined: 06 Oct 2008 Posts: 5
|
Posted: Thu Jan 29, 2009 1:17 am Post subject: |
|
|
Nice one Sindre.
chmod +x subsonic.sh (because I copied from windows probably)
Subsonic is asking for LAME...I can't find the LAME package for FreeBSD....can you help? |
|
| Back to top |
|
 |
AndyD
Joined: 06 Oct 2008 Posts: 5
|
Posted: Thu Jan 29, 2009 9:10 am Post subject: |
|
|
Oh..I knew there was something I forgot....
pkg_add -v -r javawmwrapper
doesn't work, I downloaded the package and did it as:
pkg_add -v javawmwrapper.tgz (or whatever it was called.
Also Subsonic doesn't auto start, I've just chmod 777 subsonic.sh to see if that works. |
|
| Back to top |
|
 |
sindre_mehus

Joined: 29 Nov 2005 Posts: 1138 Location: Oslo, Norway
|
Posted: Thu Jan 29, 2009 9:22 am Post subject: |
|
|
| AndyD wrote: | pkg_add -v -r javawmwrapper
doesn't work |
Oops, my mistake - it should be "javavmwrapper", not "javawmwrapper".
(I've corrected the typo in the original post).
Thanks for reporting it! |
|
| Back to top |
|
 |
heinakenka
Joined: 01 Mar 2009 Posts: 1
|
Posted: Sun Mar 01, 2009 4:22 am Post subject: |
|
|
Hi,
Just some clarifying questions:
- which version of Java is right for latest FreeNAS?
- I use windows pc for browsing so what how do I get the Java to the FreeNAS machine? Copy of cource but which directory etc...? |
|
| Back to top |
|
 |
jingy
Joined: 25 Apr 2009 Posts: 1
|
Posted: Sat Apr 25, 2009 10:02 pm Post subject: AVI,WMV, ASF streaming |
|
|
Hi! Subsonic is awesome! Does anybody know or can give a step-by-step procedure on how to streaming video formats like avi, asf, wmv etc using freenas server? I'm a total newbie with this transcoding thing but willing to learn. Also, I know my subsonic works beacuse I can stream my mp3s.
Thanks a lot! _________________ jingyHOMEserver |
|
| Back to top |
|
 |
Kryspy
Joined: 06 Jun 2009 Posts: 1
|
Posted: Sat Jun 06, 2009 11:19 pm Post subject: |
|
|
Hi,
What is the reason as to why it cannot run on a embedded install ??
Thanks
Kryspy |
|
| Back to top |
|
 |
rich0805
Joined: 17 Jun 2009 Posts: 11 Location: United Kingdom
|
Posted: Wed Jun 17, 2009 8:36 pm Post subject: |
|
|
I am I missing something here?
Step one says download
Step two says install
Step three says the file downloaded in one
So where do I get the files I need to install in two?
Richard |
|
| Back to top |
|
 |
sgx1
Joined: 29 Apr 2009 Posts: 19
|
Posted: Thu Jun 18, 2009 10:11 pm Post subject: |
|
|
Using the FreeNAS console, just type in those commands (omitting the $) to download and install the packages from the FreeBSD repository.
| Quote: | pkg_add -v -r xtrans
pkg_add -v -r xproto
pkg_add -v -r xextproto
pkg_add -v -r javavmwrapper
|
|
|
| Back to top |
|
 |
rich0805
Joined: 17 Jun 2009 Posts: 11 Location: United Kingdom
|
Posted: Fri Jun 19, 2009 8:41 am Post subject: |
|
|
Thanks sgx1, I'll give that ago...This is all pretty new to me, I'm more used to DOS and Windows
I installed FreeNAS months ago and it has worked perfectly ever since, this will be the first time I have had to go back and do anything! |
|
| Back to top |
|
 |
censu
Joined: 25 Jul 2009 Posts: 2
|
Posted: Sat Jul 25, 2009 7:14 pm Post subject: |
|
|
Possible noob question here, but everytime I try to complete Step 3 (installing the Java Runtime), the install begins and runs for about 30 seconds, then gets stuck in a loop prompting me for a yes or no answer to the Java license agreement. I am trying to perform the install using the Advance/Execute command interface in FreeNAS. I have uploaded the JRE .tbz to an FTP site and I am running the code "pkg_add -v <ftp address> diablo-jre-freebsd6.i386.1.6.0.07.02.tbz".
If I am going about this in the completely wrong manner, could someone please post some step by step instructions (written for an idiot ) on how to perform the installation? |
|
| Back to top |
|
 |
sgx1
Joined: 29 Apr 2009 Posts: 19
|
Posted: Sun Jul 26, 2009 5:42 pm Post subject: |
|
|
The Java installation cannot be done through the web configuration page. It just loops, as you've seen. There may be a way to pipe in the "y", but I've not tested.
Instead, at the FreeNAS computer, you go to the Console option and type in the same pkg_add command, which will go through the same process, but will allow you to enter a response at the prompt.
Alternatively, you can enable SSH in the FreeNAS services, and you can then use TelNet (Windows: Start > Run > CMD > "TelNet <ipaddress> 22") to get to the command line as well. Then, you can run the same pkg_add command.
I hope this helps.
Also, if you're using the newest FreeNAS based off of BSD 7, you can use the JRE for BSD 7 instead. |
|
| Back to top |
|
 |
censu
Joined: 25 Jul 2009 Posts: 2
|
Posted: Mon Jul 27, 2009 5:14 am Post subject: |
|
|
| Well I know I was doing something wrong! Thanks to you, I am now up and running and loving it. Thanks again! |
|
| Back to top |
|
 |
morpheus214
Joined: 27 Jul 2009 Posts: 8
|
Posted: Mon Jul 27, 2009 3:01 pm Post subject: |
|
|
It doesnt' work for me.
I tried to install it on FreeNAS v. 0.69.2. I installed the packages needed for java as well as diablo-jre-freebsd6.i386.1.6.0.07.02.tbz. Then i created a folder /var/subsonic/standalone/ and copied the contents from the *.tar.gz into the folder. I set the path for the *.sh file and restarted.
When i opened <myfreenas>:8080 in the browser, nothing happened, so i started the sh-file again through the command --> again nothing.
So i opened the subsonic log:
| Code: | 118 [main] INFO org.springframework.context.support.ClassPathXmlApplicationContext - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@34a1fc: display name [org.springframework.context.support.ClassPathXmlApplicationContext@34a1fc]; startup date [Mon Jul 27 14:21:21 GMT 2009]; root of context hierarchy
365 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [applicationContext-deployer.xml]
Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 5 in XML document from class path resource [applicationContext-deployer.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:369)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:313)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:290)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:158)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:184)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:112)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:97)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:411)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:338)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:122)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:66)
at net.sourceforge.subsonic.booter.Main.<init>(Main.java:16)
at net.sourceforge.subsonic.booter.Main.main(Main.java:21)
Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:78)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:361) |
Does this mean i have the wrong java version? I have no idea what to do now... Do i have to deinstall(how?) java and install another version?
Please help me  |
|
| Back to top |
|
 |
sgx1
Joined: 29 Apr 2009 Posts: 19
|
Posted: Mon Jul 27, 2009 4:04 pm Post subject: |
|
|
That looks similar to the error message I was getting with the Subsonic 3.7 beta.
Which Subsonic package are you installing? |
|
| Back to top |
|
 |
|