Page 1 of 2

How to install Subsonic on Ubuntu

PostPosted: Tue Jan 13, 2009 5:29 pm
by sindre_mehus
OBSOLETE: As of February 2010 a separate Ubuntu/Debian package is available for download, simplifying installation on Ubuntu and obsoleting this tutorial.

Installing Subsonic on the Ubuntu Linux distribution is a straight-forward process.
The following was done with Subsonic 3.6 and Ubuntu 8.10.

Step 1: Install Sun Java 6 (or later):
Code: Select all
$ sudo apt-get install sun-java6-jdk

Step 2: Download Subsonic standalone version and install it in /var/subsonic/standalone, as described here.
Code: Select all
$ sudo mkdir -p /var/subsonic/standalone
$ sudo tar -C /var/subsonic/standalone -zvxf subsonic-3.6.beta2-standalone.tar.gz

Step 3: To start Subsonic, execute the subsonic.sh script:
Code: Select all
$ sudo /var/subsonic/standalone/subsonic.sh

If you like Subsonic to start automatically when booting, add the following line to /etc/rc.local:
Code: Select all
/var/subsonic/standalone/subsonic.sh


Your comments are welcome!

PostPosted: Fri Feb 27, 2009 8:39 pm
by braddyo
Sindre,

I installed on Debian, and the procedure is mostly the same - you just have to add the following line to /etc/apt/sources.list

deb http://ftp.de.debian.org/debian lenny main non-free

Thanks for the guide.

Ubuntu installation problem

PostPosted: Mon Apr 06, 2009 1:31 pm
by hook2009
I'm getting an error when I try to run subsonic:

8822 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed

Perhaps this may also help:

Error creating bean with name 'podcastService' defined in ServletContext resource

This is followed by the java stack dump. I downloaded the latest Ubuntu version from the web site (subsonic-3.6-standalone.tar.gz). I assume that there's something that I've missed somewhere - can anyone out there enlighten me ?

TIA

PostPosted: Sun Apr 12, 2009 7:32 pm
by Lobo
As a new user to Ubuntu I am having difficulty with installing. Is there any chance this will be made into its own .deb file so it may be installed without much interaction?

Any clarity or help would be appreciated, I am really looking forward to be able to use SS but I find these instructions a little vague.

My main obstacle is Step 2.
# Unpack subsonic-x.x-standalone.tar.gz to SUBSONIC_HOME/standalone. SUBSONIC_HOME is typically c:\subsonic on Windows, and /var/subsonic on Unix-based operating systems.

So am I extracting to a folder called "SUBSONIC_HOME/standalone" and then putting that into the folder "subsonic" so it looks like "/var/subsonic/SUBSONIC_HOME/standalone"? Is that correct? Also, don't I have to first open Terminal and run gksudo nautilus in order to add folders to /var?

# Optionally configure the startup script SUBSONIC_HOME/standalone/subsonic.sh

What exactly do you mean by configure? How is this done?

# Execute the startup script. (Typically you will configure your operating system to execute the script automatically at start-up.)

How is this done?

# Open the Subsonic web page. The default address is http://localhost:8080.[/i]

PostPosted: Fri Apr 17, 2009 5:43 pm
by bormuff
Lobo wrote:As a new user to Ubuntu I am having difficulty with installing. Is there any chance this will be made into its own .deb file so it may be installed without much interaction?

Any clarity or help would be appreciated, I am really looking forward to be able to use SS but I find these instructions a little vague.


The instructions at the top of the thread are pretty comprehensive. Just open your terminal app, probably via Applications -> Accessories -> Terminal and then start pasting the commands as shown, one step at a time.

You may find that the Java app is already installed so can skip that step.

Don't worry about SUBSONIC_HOME, that's just a shorthand way to describe the location of Subsonic on your system.

How to start Subsonic on boot on Ubuntu

PostPosted: Sat May 09, 2009 8:46 pm
by eksatx
Your suggestion of adding a line to /etc/rc.local does not appear to work for me.

Has this worked for anybody?

If not, do you have any suggestions?

PostPosted: Sat May 09, 2009 9:19 pm
by jonathanroz
I used these instructions and have it running on Ubuntu. Perhaps post something in the help section with the exact issue you are seeing and someone else may have had a similar issue or know how to work through it.

How to start Subsonic on boot on Ubuntu

PostPosted: Sat May 09, 2009 9:28 pm
by eksatx
I have subsonic running -- it just won't start on boot. Can you confirm that you are able to get subsonic to start on boot?

PostPosted: Sat May 09, 2009 10:25 pm
by jonathanroz
Yes it works for me. If you are able to start it manually then adding it to rc.local should work. I would validate the location is listed correctly and that your rc.local ends in exit 0

Below is what mine looks like

Code: Select all
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

/var/subsonic/standalone/subsonic.sh

exit 0


You can also add it thru the Ubuntu GUI by going to System-->Preferences-->Sessions and adding the application there using the Add button.

Subsonic will not start on boot on Ubuntu

PostPosted: Sun May 10, 2009 5:07 pm
by eksatx
I believe I am doing the same thing. Here is my /etc/rc.local:
Code: Select all
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

/var/subsonic/standalone/subsonic.sh

exit 0

After I reboot, subsonic is not running. The subsonic.log file has not been updated. The subsonic_sh.log file has a mod time of when the machine was booted, but the file is empty (0 bytes).

I am able to start subsonic fine from a terminal with

Code: Select all
sudo /var/subsonic/standalone/subsonic.sh


Ideas?

Re: Subsonic will not start on boot on Ubuntu

PostPosted: Sun May 24, 2009 10:03 am
by pino_otto
eksatx wrote:After I reboot, subsonic is not running. The subsonic.log file has not been updated. The subsonic_sh.log file has a mod time of when the machine was booted, but the file is empty (0 bytes).

I am able to start subsonic fine from a terminal with

Code: Select all
sudo /var/subsonic/standalone/subsonic.sh


Ideas?


I solved the problem simply using the "nohup" command in front of the start command (/var/subsonic/standalone/subsonic.sh) in the file /etc/rc.local:

nohup /var/subsonic/standalone/subsonic.sh

exit 0

I hope this can help you.
________

nohup solved the problem

PostPosted: Wed May 27, 2009 3:12 pm
by eksatx
Adding nohup to the command in /etc/rc.local as you suggested worked for me too:

Code: Select all
nohup /var/subsonic/standalone/subsonic.sh


Should this perhaps be added to the instructions at the top of this thread?

PostPosted: Wed Aug 19, 2009 3:59 am
by jonathanroz
After upgrading my server from Ubuntu 8.10 to 9.04 my subsonic stopped working.

When I tried to start it manually it would not start and the log file showed that the database was locked.

Adding the nohup command as shown in the above post got everything up and running after messing with my server for almost an hour...

Thanks, I guess I should have checked here faster.

Help after install reach localhost

PostPosted: Wed Sep 09, 2009 11:08 am
by ferreol
Dear all ,

I have follow this procedure on Ubuntu 9.04 and all worked fine however I used to get the setup page on http://localhost or http://localhost:8080 which I don't get anymore .

It shows me the root of the /var/subsonic instead of the page config .

Maybe it's due to the fact I have several servers , then I can edit the setup.sh but I m not successful even specifiyng the domain it keeps showing me the root of the /var/subsonic folder .

any advices ?

thanks in advance.

PostPosted: Wed Sep 09, 2009 7:35 pm
by jigsaw
Did you change the context_path?
in subsonic.sh:
SUBSONIC_CONTEXT_PATH=/subsonic