[Tutorial] Madsonic on Mac (apple)

Frequently asked questions. Tutorials, tips and tricks.
ffa
Contributor
Contributor
Posts: 8
Joined: 04 Mar 2013, 00:07
Has thanked: 0
Been thanked: 3 times

[Tutorial] Madsonic on Mac (apple)

Unread post by ffa »

Mac currently runs java 6 (1.6) by default. For OSX 10.7, you may upgrade to java 7 (1.7) using software update. For OSX 10.6, you have to run java 7 side by side with java 6. Java 6 will be the default java version. So, the JAVA_HOME must be explicitly set for applications to use java 7. As a result, java 7 will not interfere with other programs or damage your system.

Notes:
  • Madsonic is a fork of Subsonic and not all instances of the word "Subsonic" have been replaced with "Madsonic" in the code. So, appearances of the word "Subsonic" are not a mistake.
  • Make sure to disable all power management on the Mac (gurutech)
Phase 1: Install Madsonic
  1. download Madsonic standalone archive. For example, "20130307_subsonic-MashupMod-4.8.3360.beta3-standalone.tar.gz".
  2. extract the archive and place the extracted folder anywhere you want. I recommend dropping the folder in the "Applications" folder. For example, "/Applications/Madsonic"
  3. create a "Madsonic" folder in "/Library/Application Support". This will be the Madsonic home folder.
  4. download the latest transcoders archive. For example, "subsonic-transcode_latest_2013-03-07.zip".
  5. extract the archive, and move the files in the "mac" directory to "/Library/Application Support/Madsonic/transcode". If the path does not exist, create the folders. If files already exist in the path, overwrite them.
Phase 2: Install Java 7
Note: For OSX 10.7, first try upgrading to Java 7 with "Software Update". If updating fails, continue with Phase 2.
  1. download the java 7 archive (not the installer, dmg) from http://www.oracle.com/technetwork/java/ ... 80261.html . For example, At the time of writing this tutorial, the java 7 archive is named "jre-7u17-macosx-x64.tar.gz".
  2. extract the java 7 folder. For example, the folder name may be "jre1.7.0_17.jre".
  3. move the extracted java 7 folder to "/Library/Java/JavaVirtualMachines/". For example, the resulting folder structure is "/Library/Java/JavaVirtualMachines/jre1.7.0_17.jre" where "jre1.7.0_17.jre" is the extracted folder.
  4. open Terminal. Terminal may be found by typing terminal
Phase 3: Run Madsonic using Java 7
Note: For OSX 10.7, if upgrading to Java 7 succeeded in Phase 2, do not specify "JAVA_HOME". An example is provided below.
  1. open Terminal. Terminal may be found by typing terminal in OSX's search, "spotlight".
  2. The string below is a template which once filled will be entered into Terminal as a command in the next step. The command starts Madsonic with Java 7.

    Code: Select all

    JAVA_HOME=/Library/Java/JavaVirtualMachines/<java folder name from Phase 2>/Contents/Home <path to subsonic.sh file in the Madsonic folder from Phase 1> --home=<path to Madsonic "home" folder from Phase 1>
    For OSX 10.7, if upgrading to Java 7 succeeded in Phase 2

    Code: Select all

    <path to subsonic.sh file in the Madsonic folder from Phase 1> --home=<path to Madsonic "home" folder from Phase 1>
    Replacements to fill:
    • Replace "<java folder name from Phase 2>" accordingly; for example, "JAVA_HOME=/Library/Java/JavaVirtualMachines/jre1.7.0_17.jre/Contents/Home".
    • Replace "<path to subsonic.sh file in the Madsonic folder from Phase 1>" accordingly; for example, "/Applications/Madsonic/subsonic.sh".
    • Replace "<path to Madsonic "home" folder from Phase 1>" accordingly; for example, "/Library/Application Support/Madsonic".
    Example of final string:

    Code: Select all

    JAVA_HOME=/Library/Java/JavaVirtualMachines/jre1.7.0_17.jre/Contents/Home /Applications/Madsonic/subsonic.sh --home=/Library/Application Support/Madsonic
    For OSX 10.7, if upgrading to Java 7 succeeded in Phase 2

    Code: Select all

    /Applications/Madsonic/subsonic.sh --home=/Library/Application Support/Madsonic
  3. In Terminal, enter the command (string) created in the previous step as a single line.
  4. After entering the command, a message like the one below will confirm Madsonic is running.

    Code: Select all

    Started Subsonic [PID 80526, /Library/Application Support/Madsonic/subsonic_sh.log]
  5. Go to "localhost:4040" in your web browser to start using Madsonic - YAY!
Handling Errors:
If Madsonic does not show in your web browser, check the log file located in the Madsonic home folder created in Phase 1. For example, "/Library/Application Support/Madsonic/subsonic_sh.log". And, yes, the location of the log file is outputted during Phase 3 after Madsonic is started.

Help
I offer help, but no guarantees.
And, once the Madsonic repo is up, I'll submit a patch or something.
Last edited by ffa on 12 Mar 2013, 22:02, edited 5 times in total.
These users thanked the author ffa for the post (total 2):
MadsonicKicknGuitar
Rating: 15.38%
User avatar
Madsonic
Administrator
Administrator
Posts: 984
Joined: 07 Dec 2012, 03:58
Answers: 7
Has thanked: 1201 times
Been thanked: 470 times

Re: [Tutorial] Madsonic on Mac (apple)

Unread post by Madsonic »

Thanks for the great guide!
Best regards
:)
gurutech
Contributor
Contributor
Posts: 323
Joined: 02 Jan 2013, 04:56
Has thanked: 11 times
Been thanked: 105 times

Re: [Tutorial] Madsonic on Mac (apple)

Unread post by gurutech »

Just a tip if using a Mac as your Madsonic server... make sure to disable all power management on the Mac.

While I don't have Madsonic on my Mac, my Mac goes to sleep after not being used for some time...
ffa
Contributor
Contributor
Posts: 8
Joined: 04 Mar 2013, 00:07
Has thanked: 0
Been thanked: 3 times

Re: [Tutorial] Madsonic on Mac (apple)

Unread post by ffa »

Updated

Made a correction to Phase 1: "/Library/Application Support/Subsonic/transcode" changed to "/Library/Application Support/Madsonic/transcode".
These users thanked the author ffa for the post:
Madsonic
Rating: 7.69%
T800
Posts: 1
Joined: 28 Jun 2013, 21:24
Has thanked: 0
Been thanked: 0

Re: [Tutorial] Madsonic on Mac (apple)

Unread post by T800 »

I tried installing Madsonic via this guide bu cannot get it working.

I'm on Snow Leopard 10.6.8 Core 2 Duo

I quit Subsonic then followed these instructions.
When I enter

Code: Select all

JAVA_HOME=/Library/Java/JavaVirtualMachines/jre1.7.0_25.jre/Contents/Home /Applications/Madsonic/subsonic.sh --home=/Library/Application Support/Madsonic
in Terminal I get this:

Code: Select all

Last login: Sat Jun 29 08:17:13 on ttys000
Media-Terminal:~ mc$ JAVA_HOME=/Library/Java/JavaVirtualMachines/jre1.7.0_25.jre/Contents/Home /Applications/Madsonic/subsonic.sh --home=/Library/Application Support/Madsonic
Usage: subsonic.sh [options]
  --help               This small usage guide.
  --home=DIR           The directory where Madsonic will create files.
                       Make sure it is writable. Default: /var/subsonic
  --host=HOST          The host name or IP address on which to bind Madsonic.
                       Only relevant if you have multiple network interfaces and want
                       to make Madsonic available on only one of them. The default value
                       will bind Madsonic to all available network interfaces. Default: 0.0.0.0
  --port=PORT          The port on which Madsonic will listen for
                       incoming HTTP traffic. Default: 4040
  --https-port=PORT    The port on which Madsonic will listen for
                       incoming HTTPS traffic. Default: 0 (disabled)
  --context-path=PATH  The context path, i.e., the last part of the Madsonic
                       URL. Typically '/' or '/madsonic'. Default '/'
  --max-memory=MB      The memory limit (max Java heap size) in megabytes.
                       Default: 200
  --pidfile=PIDFILE    Write PID to this file. Default not created.
  --quiet              Don't print anything to standard out. Default false.
  --default-music-folder=DIR           Configure Madsonic to use this folder for music.  This option 
                                       only has effect the first time Madsonic is started. Default '/var/music'
  --default-upload-folder=DIR          Configure Madsonic to use this folder for music.  This option 
                                       only has effect the first time Madsonic is started. Default '/var/music/Incoming'
  --default-podcast-folder=DIR         Configure Madsonic to use this folder for Podcasts.  This option 
                                       only has effect the first time Madsonic is started. Default '/var/music/Podcast'
  --default-playlist-folder=DIR        Configure Madsonic to use this folder for playlists.  This option 
                                       only has effect the first time Madsonic is started. Default '/var/playlist'
  --default-playlist-export-folder=DIR Configure Madsonic to use this folder for playlist export.  This option 
                                       only has effect the first time Madsonic is started. Default '/var/playlist-export'
Media-Terminal:~ mc$ 
There is no subsonic_sh.log created.

Just to be sure:

create a "Madsonic" folder in "/Library/Application Support". This will be the Madsonic home folder.
As in the master Library folder not Users/<myusersaccount>/Library?
download the latest transcoders archive. For example, "subsonic-transcode_latest_2013-03-07.zip".
extract the archive, and move the files in the "mac" directory to "/Library/Application Support/Madsonic/transcode". If the path does not exist, create the folders. If files already exist in the path, overwrite them.
When you say the "mac" directory do you mean the Users/<myusersaccount>/Library/Application Support/Madsonic/transcode?

Thanks for any help.
TNRocker
Posts: 5
Joined: 15 Jun 2013, 04:04
Has thanked: 0
Been thanked: 2 times

Re: [Tutorial] Madsonic on Mac (apple)

Unread post by TNRocker »

I got the same message, using 10.6.8 with clean install. Any suggestions?

I have been using Subsonic for a year and a half but I am interested in trying out Madsonic. I donated for Subsonic and would be more than happy to donate to Madsonic, but I would like to get it up and running.

Thanks in advance for any suggestions.

Edit - I went ahead and upgraded to Lion. I was successful in getting Java 7 installed and confirmed on Oracle site. I also have Java preference in System Preferences.

Same problem as described above. No log file created???? Is there a step missing? Any suggestions welcome.
TNRocker
Posts: 5
Joined: 15 Jun 2013, 04:04
Has thanked: 0
Been thanked: 2 times

Re: [Tutorial] Madsonic on Mac (apple)

Unread post by TNRocker »

I originally could not get Madsonic running following the above directions. I tried on 10.6.8 and 10.7.3. I gave up and took a look at Music Cabinet. I got Music Cabinet running using these directions -
http://dilerium.se/musiccabinet/tmp/osx.htm.

Inspired I decided to take a second look at Madsonic.

First the easy way to install Java 7 on OSX 10.6.8. Thank you utube!

Find Systemversion.plist found in System/Library/Coreservices. Drag this file to your desktop and open with text edit. Change both instances of 10.6.8 to 10.7.3. Save and then replace back in Coreservices. I restarted but I am not sure if you need to. Download and install Java 7 jdk. You will now have Java Panel in System Preferences. Go to Java site and confirm your version. Go back to the Systemversion.plist and change back to 10.6.8.

I installed Madsonic and transcoders as described in the OP. If you name the home folder Madsonic as suggested you need to change the home folder in first line of the Subsonic.sh script.

SUBSONIC_HOME=/Applications/Subsonic (should be Madsonic)

I made the changes in the Subsonic.sh file suggested in the Music Cabinet link above. The paths matched my Java install. I opened Terminal, enter sh then space. I dragged the subsonic.sh file into Terminal and was able to login to Madsonic on locolhost:4040.

I thought this might help others get past the Java 7 issue.

EDIT: Java 7 will install but it wasn't quite right. The install still left Java 6 so Madsonic was not stable. I went ahead and installed Lion and did a clean install of Java and Madsonic.
These users thanked the author TNRocker for the post:
Madsonic
Rating: 7.69%
etyrnal
Posts: 64
Joined: 04 Nov 2013, 05:56
Has thanked: 31 times
Been thanked: 11 times

Re: [Tutorial] Madsonic on Mac (apple)

Unread post by etyrnal »

...but how do you make Madsonic (or Subsnic) start up as a service at system boot time ... WITHOUT a user having to login?

for example, on a headless Mac mini server.
etyrnal
Posts: 64
Joined: 04 Nov 2013, 05:56
Has thanked: 31 times
Been thanked: 11 times

Re: [Tutorial] Madsonic on Mac (apple)

Unread post by etyrnal »

etyrnal wrote:...but how do you make Madsonic (or Subsnic) start up as a service at system boot time ... WITHOUT a user having to login?

for example, on a headless Mac mini server.

bump
Vintendo
Posts: 1
Joined: 02 Dec 2013, 01:47
Has thanked: 0
Been thanked: 0

Re: [Tutorial] Madsonic on Mac (apple)

Unread post by Vintendo »

Can i ask?

Why is it so hard to install This Vs SubSonic ?

I have tried a few times to get this to work as it would be perfect for something that I'm working on..

but I can never get it to work
User avatar
Madsonic
Administrator
Administrator
Posts: 984
Joined: 07 Dec 2012, 03:58
Answers: 7
Has thanked: 1201 times
Been thanked: 470 times

Re: [Tutorial] Madsonic on Mac (apple)

Unread post by Madsonic »

Vintendo wrote:Can i ask?

Why is it so hard to install This Vs SubSonic ?
I have tried a few times to get this to work as it would be perfect for something that I'm working on..
but I can never get it to work
hi there,

its some build back but you can try the native OSX Installer ...

http://forum.madsonic.org/viewtopic.php?f=17&t=795

best regards
KicknGuitar
Posts: 11
Joined: 29 Nov 2014, 10:41
Has thanked: 6 times
Been thanked: 5 times

Re: [Tutorial] Madsonic on Mac (apple)

Unread post by KicknGuitar »

I tried the instructions above but they didn't work for me. The following is what I wrote for reference to myself when I was installing MusicCabinet's Standalone - My instructions are very basic and noob friendly because I'd always forget what it was I was doing when It came time to reinstall.
My machine: Mac OS X.7.5 running Java 1.7.0_40JDK. To find out which you have open Terminal and type java -version

Installment Variations

Mac Install Package
If you're lucky someone may have coded an installer. Check the Download page on the forums or the new download page on Madsonic.org

Tomcat
I have not tried this. If you feel like giving it a go, maybe this will help.

Installing Standalone
Most likely you'll be installing/updating Madsonic this way. The instructions below are for a clean install. Any mention of removing the old folders/apps is to avoid any mixups, thus you can leave old subsonic/madsonic around in separate files for backup or saving their settings.

Pre-reqs
  1. Uninstall:
    • All existing Subsonic & Madsonic Files (Backup if you like)
    • Java 6
  2. Install:
    • Java 7 JDK [specifically the JDK!!!]
    This may not be applicable, I forget:
    • PostgreSQL 9.1 or higher
    - Database user name, "postgres".
    - Port number "54323.
Installing Subsonic
Not applicable. All Subsonic files are included in the standalone version of
Madsonic. You should probably backup and remove any existing Subsonic files.

Finally Installing
  1. Download standalone, such as Madsonic's
  2. Stop Subsonic If running… if so, why do you still have it?!
  3. Rename the standalone folder to Madsonic (Note Capitalization)
  4. Move it into your Applications folder (or where ever you'd like)
  5. Open up the newly renamed Madsonic folder
  6. Open Madsonic.sh in a text editing app. Don't double click! (right click - open
    with…)
  7. In the text look for,

    Code: Select all

    MADSONIC_HOME=/var/Madsonic
  8. Replace with the path to the new Subsonic folder you created (Case-sensitive).
    Such as,

    Code: Select all

    MADSONIC_HOME=/Applications/Madsonic

I did a bunch of other stuff using my old reference such as Add fancy character recognition and starting at login but I'll have to post more another time.
These users thanked the author KicknGuitar for the post (total 2):
Madsonicetyrnal
Rating: 15.38%
addseo1115
Has thanked: 0
Been thanked: 0

Re: [Tutorial] Madsonic on Mac (apple)

Unread post by addseo1115 »

madsonic around in separate files for backup or saving their settings.
Post Reply