How to install Subsonic on Mac OS X

Tutorials, tips and tricks.

Moderator: moderators

How to install Subsonic on Mac OS X

Postby tacgnol » Mon Jan 04, 2010 1:56 pm

Updated February 2010
Please notice that a native Mac installer for Subsonic is now available. Download it from subsonic.org

-Sindre


This is just a rough draft. I'll try to update it more later. You should be comfortable with the command line in order to install Subsonic.


How to install the standalone version
  1. Download the standalone version from the download page.
  2. Open up the terminal. Go ahead and setup your install location. The default location is /var/subsonic so for that you'd do "sudo mkdir /var/subsonic."
  3. Move your subsonic tarball (the file you downloaded in step 1) to the location you created in step Say for example you downloaded version 3.8 and you created the default location of /var/subsonic for subsonic, you'll want to run something "sudo mv subsonic-3.8-standalone.tar.gz /var/subsonic/".
  4. Go to your subsonic directory and unzip the subsonic compressed file. You can do something like "cd /var/subsonic" followed by "sudo tar zxvf subsonic-3.8-standalone.tar.gz".
  5. Next set the permissions on your subsonic directory to executable: "sudo chmod -R 755 /var/subsonic".
  6. Run subsonic with "sudo /var/subsonic/subsonic.sh". You should now be able to go to http://localhost:8080 and see the login page if everything went correctly.


Installing subsonic as a webapp in Tomcat
Using this method of installing subsonic, I assume that you already have Tomcat and Java installed. If not, there are many tutorials on the internet how to do so.
  1. First download the war file from the subsonic download page.
  2. Unzip the file and you should end up with a file called subsonic.war.
  3. Move this file to your Tomcat webapps directory. For me, I am on Snow Leopard server which comes with Tomcat so I just ran "sudo mv subsonic.war /Library/Tomcat/webapps".
  4. Make sure your subsonic directory and web app directories have the correct ownership and permissions. For your subsonic directory you can run "sudo chmod -R 755 /var/subsonic" and (supposing _appserver is your tomcat user) "sudo chown -R _appserver /var/subsonic". Then for your webapp directory it's going to be "sudo chmod -R 755 /Library/Tomcat/webapps/subsonic" and "sudo chown -R _appserver /Library/Tomcat/webapps/subsonic".
  5. Next you'll need to run tomcat. In the bin directory of your tomcat installation you'll find startup.sh. Run "sudo ./startup.sh" and that should start up Tomcat.
  6. You should now be able to access your install at http://localhost:8080/subsonic.


Serving your site to the outside world with Apache
So suppose you have apache up and running and you have an install of subsonic running at http://localhost:8080. How do you serve up subsonic to the outside world along with the your other websites on port 80? Probably the easiest way to do this is with mod_proxy. With mod_proxy, you should be able to point a particular address to 127.0.0.1:8080. Other options include mod_jk and mod_proxy_ajp although these require a bit more configuration in Tomcat/Java.


Transcoding
The easiest way to do transcoding is with Macports. That way you don't have to compile these programs from source.
  1. Download and install macports from their website http://www.macports.org
  2. Suppose you wanted to grab lame, run "sudo port install lame". This should install a copy of lame to /opt/local/bin so you could run /opt/local/bin/lame at this point.
  3. Do a symlink for lame in your /var/subsonic/transcode directory. That would be something like "sudo ln -s /opt/local/bin/lame /var/subsonic/trancode/lame".
  4. Make sure it's executable by running "sudo chmod -R 755 /var/subsonic/transcode".
NOTE: Some of the default transcoding commands are messed up. For instance, the first step of OGG should be "oggdec %s -o -". Search the forums for more info
User avatar
tacgnol
 
Posts: 31
Joined: Mon Dec 21, 2009 1:46 pm

Postby sindre_mehus » Wed Feb 17, 2010 9:06 pm

Hi,

I just created a native Mac installer for Subsonic. I would appreciate if someone could try it out and let me know how it works. (It works flawlessly on my MacBook Pro, at least).

Download it here:
http://sourceforge.net/projects/subsoni ... g/download

Please notice:
o Installs Subsonic application in /Applications/Subsonic.app
o Installs other files in /Library/Application Support/Subsonic/
o Uses port 4040 by default.
o To change port number or other basic settings, edit /Applications/Subsonic.app/Contents/Info.plist
o For trouble-shooting, start /Applications/Subsonic.app/Contents/MacOS/JavaApplicationStub in a terminal and look at logging.

Thanks!
Sindre
Subsonic developer
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Standalone App

Postby BigO4U » Tue Feb 23, 2010 8:32 pm

Thanks for your work on the standalone app, it works great on my power mac g5. However I am having some troubles getting transcoding setup. I get an error (below) when i go to install lame via macports. Any advice?

"checking for C compiler default output... configure: error: C compiler cannot create executables

Error: The following dependencies failed to build: ncurses ncursesw"
BigO4U
 
Posts: 1
Joined: Tue Feb 23, 2010 8:22 pm

Postby sindre_mehus » Tue Feb 23, 2010 9:10 pm

I'm not sure. I just did 'sudo port install lame' without any errors (but that's on x86 architecture, of course).

My only suggestion would be to look at precompiled binaries, e.g., http://www.thalictrum.com/index.php?pageid=6&artid=6

Thanks,
Sindre
Subsonic developer
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Postby sindre_mehus » Tue Feb 23, 2010 10:21 pm

I'm a Mac newbie, but I know you must have Xcode installed to build macports. Maybe that's your problem?

http://www.macports.org/install.php
Subsonic developer
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Postby tacgnol » Wed May 12, 2010 1:22 am

Sindre's right. You'll need Xcode which comes with gcc so that you can build macports packages. You could also probably get a C compiler elsewhere but Xcode is probably you're best option. You can alternatively build lame from source or use another package manager like Fink but you'll have to have a C compiler to build lame.

Also, the mac installer works well. The only thing I would change is to run it as a daemon and add a plist file to /Library/LaunchDaemons/. I might be able to work on that this week if I have time.
User avatar
tacgnol
 
Posts: 31
Joined: Mon Dec 21, 2009 1:46 pm

Postby vividboarder » Wed Sep 22, 2010 1:45 pm

Just joined to post my experience with this...

I have port on my iMac (Snow Leopard) and I've used it before, but lame and ffmpeg will not build for me. Instead I went about manually installing them.

First, you must have XCode so you can compile source.
Next I basically followed these directions exactly: http://stephenjungels.com/jungels.net/a ... howto.html
There I installed 'lame' and 'ffmpeg'. I did NOT install the optional 'FACC' section.

After following those directions I verified that my lame and ffmpeg commands work by manually transcoding a song. I realized that it did NOT function with Subsonic correctly.

To get it to work with Subsonic:
Log In as an admin and make sure m4a is enabled in Transcoder settings.
Next, there are default symblinks to lame and ffmpeg to where port would have installed them. Since we didn't use port, we need to remove these links.

Code: Select all
sudo rm /Library/Application\ Settings/Subsonic/transcode/lame
sudo rm /Library/Application\ Settings/Subsonic/transcode/ffmpeg


That should remove the two links.

Transcoding now works perfect for me with the web player. I have not gotten it to stream properly to Winamp yet though.
vividboarder
 
Posts: 18
Joined: Wed Sep 22, 2010 1:37 pm
Location: 223

Postby einsteinx2 » Mon Sep 27, 2010 7:45 pm

I was looking for where to put this and saw this thread. It seemed like the proper place.

I've statically compiled the ffmpeg and lame binaries and placed them in an installer package so that Mac Ports and Xcode aren't needed and the command line doesn't have to be touched.

All you have to do is download this DMG image, double click it (or if you have Safari it will open automatically), then double click the Installer package inside.

Follow the simple prompts and it will install the plugins to the correct place. I've talked to Sindre and he will be including these in the next Mac installer for Subsonic, but for now use this package.

DOWNLOAD LINK:
http://isub.einsteinx2.com/Subsonic_Transcoding_Plugins_OS_X.dmg
iSub Developer - isubapp.com - support@isubapp.com
Image
User avatar
einsteinx2
 
Posts: 214
Joined: Thu Mar 25, 2010 2:31 am

os x Standalone transcoder?

Postby joelbrave » Thu Mar 31, 2011 10:30 am

That transcoder link is dead. Is there a way to install transcoder in the Standalone for Mac OS X ? I'm running tiger 10.4.11 and can't really upgrade at this time. I need a transcoder for standalone if at all possible.

Any suggestions?

- Joel
joelbrave
 
Posts: 19
Joined: Mon Feb 28, 2011 1:25 am


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 11 guests