How to install Subsonic on Ubuntu

Tutorials, tips and tricks.

Moderator: moderators

How to install Subsonic on Ubuntu

Postby sindre_mehus » Tue Jan 13, 2009 5:29 pm

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!
Last edited by sindre_mehus on Fri Feb 26, 2010 6:31 pm, edited 2 times in total.
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Postby braddyo » Fri Feb 27, 2009 8:39 pm

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.
User avatar
braddyo
 
Posts: 97
Joined: Mon Oct 29, 2007 10:27 pm
Location: UT

Ubuntu installation problem

Postby hook2009 » Mon Apr 06, 2009 1:31 pm

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
hook2009
 
Posts: 1
Joined: Mon Apr 06, 2009 1:25 pm

Postby Lobo » Sun Apr 12, 2009 7:32 pm

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]
Lobo
 
Posts: 1
Joined: Sun Apr 12, 2009 7:28 pm

Postby bormuff » Fri Apr 17, 2009 5:43 pm

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.
bormuff
 
Posts: 32
Joined: Fri Apr 17, 2009 5:14 pm

How to start Subsonic on boot on Ubuntu

Postby eksatx » Sat May 09, 2009 8:46 pm

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?
eksatx
 
Posts: 4
Joined: Sat May 09, 2009 8:43 pm

Postby jonathanroz » Sat May 09, 2009 9:19 pm

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.
jonathanroz
 
Posts: 172
Joined: Thu Dec 18, 2008 8:54 pm
Location: Frisco, TX USA

How to start Subsonic on boot on Ubuntu

Postby eksatx » Sat May 09, 2009 9:28 pm

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?
eksatx
 
Posts: 4
Joined: Sat May 09, 2009 8:43 pm

Postby jonathanroz » Sat May 09, 2009 10:25 pm

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.
jonathanroz
 
Posts: 172
Joined: Thu Dec 18, 2008 8:54 pm
Location: Frisco, TX USA

Subsonic will not start on boot on Ubuntu

Postby eksatx » Sun May 10, 2009 5:07 pm

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?
eksatx
 
Posts: 4
Joined: Sat May 09, 2009 8:43 pm

Re: Subsonic will not start on boot on Ubuntu

Postby pino_otto » Sun May 24, 2009 10:03 am

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.
________
Last edited by pino_otto on Thu Feb 03, 2011 5:25 am, edited 1 time in total.
pino_otto
 
Posts: 8
Joined: Sun May 24, 2009 9:57 am

nohup solved the problem

Postby eksatx » Wed May 27, 2009 3:12 pm

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?
eksatx
 
Posts: 4
Joined: Sat May 09, 2009 8:43 pm

Postby jonathanroz » Wed Aug 19, 2009 3:59 am

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.
jonathanroz
 
Posts: 172
Joined: Thu Dec 18, 2008 8:54 pm
Location: Frisco, TX USA

Help after install reach localhost

Postby ferreol » Wed Sep 09, 2009 11:08 am

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.
ferreol
 
Posts: 5
Joined: Tue Sep 08, 2009 10:40 pm

Postby jigsaw » Wed Sep 09, 2009 7:35 pm

Did you change the context_path?
in subsonic.sh:
SUBSONIC_CONTEXT_PATH=/subsonic
Currently without Subsonic due to hardware failure :(
User avatar
jigsaw
 
Posts: 242
Joined: Sat Oct 13, 2007 12:01 pm
Location: Stavanger, Norway

Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 4 guests