Page 1 of 1
Question about installation
Posted:
Thu Dec 06, 2012 2:38 pm
by hairlesshobo
Is it possible to change where Madsonic stores the database? I'm running windows 7 and I have tried telling it to install to the root of my E drive, but it still places the db inside c:\subsonic. Is it possible to change this so the entire installation, db included, can be on a separate drive?
Thanks in advance,
Steve
Re: Question about installation
Posted:
Thu Dec 06, 2012 3:23 pm
by MadEvil
hairlesshobo wrote:Is it possible to change where Madsonic stores the database? I'm running windows 7 and I have tried telling it to install to the root of my E drive, but it still places the db inside c:\subsonic. Is it possible to change this so the entire installation, db included, can be on a separate drive?
Thanks in advance,
Steve
hi, for this i use always the standalone version. so you can change and configure in the start-script where the database is located (Windows & Linux).
Best regards
INFO:
http://www.subsonic.org/pages/installat ... standaloneINFO:
viewtopic.php?f=15&t=10445#p47049
Re: Question about installation
Posted:
Thu Dec 06, 2012 3:25 pm
by hairlesshobo
Ah! I will give that a shot and let you know how it goes.
Thank ya!!
Re: Question about installation
Posted:
Thu Dec 06, 2012 3:43 pm
by hairlesshobo
Is there some way to still configure it to run as a windows service when using the standalone version or is that only doable when you install from the setup package?
Re: Question about installation
Posted:
Thu Dec 06, 2012 8:16 pm
by hairlesshobo
Sorry to keep posting to this forum, but another question. Where is the source code for the subsonic-service executable? I searched high and low on Madsonic github and the subsonic repository on SourceForge and had no luck finding anything that resembled the source code for that utility.
From what I can tell, it looks like the limitation is that the service application is hard coded to use c:\subsonic (as is the nsis installer). I would be interested to see if it is possible to change that hard coded value, or if perhaps there is an easier way to run subsonic as a service without using that exe that would be fine as well. I just don't want to lose the flexibility of running Subsonic as a service when I move it to a secondary drive.
edit: OK, I had one more idea so I decided to just edit this post as opposed to adding another. What about running Tomcat instead of Jetty? Would it allow the database be located on a separate drive other than the C drive? I have also read that performance may be improved as well as security by upgrading to Tomcat 6 instead of Jetty 6. What do you think, would this be a good way to go about it?
Re: Question about installation
Posted:
Thu Dec 06, 2012 11:22 pm
by MadEvil
sorry this is hard-coded into subsonic/madsonic, you can use tomcat but the same directory will be used.
Source can you find here
https://github.com/MadMartybest regards
Re: Question about installation
Posted:
Fri Dec 07, 2012 12:44 am
by hairlesshobo
WOOHOO!!
I was able to figure out a workaround for this, and it was actually very simple. For anyone else who is interested in placing the subsonic database in a location other than C:\subsonic (obviously on windows) yet still run it as a windows service, follow these steps:
1. Install subsonic and specify the path to where you want to install subsonic (can be anywhere for this part).
2. Stop subsonic if it is running
3. Open the location where you installed the subsonic binaries
4. Open subsonic-service.exe.vmoptions with notepad and add the following line to the end of the file (replace with the path where you would like the subsonic data files to be located - this includes the database, log file, jetty related files, properties files and anything else normally in C:\subsonic):
-Dsubsonic.home=E:\subsonic
5. Move the contents of C:\subsonic to the path you specified in the file above.
6. Restart subsonic.
By passing this additional option to the service executable, it seems to tell subsonic where you would like the files placed, same as if you are starting subsonic with the .bat or .sh file directly.
I really hope this helps someone else!
-Steve
Re: Question about installation
Posted:
Fri Dec 07, 2012 3:15 am
by gurutech
Another thought:
Install the standalone version, then to run SS as a service, use Task Scheduler to run Subsonic when the PC is turned on (or booted up). You may need to provide your login credentials here, but it would accomplish the same thing as what you are doing.
Re: Question about installation
Posted:
Fri Dec 07, 2012 10:47 pm
by xenool
someone who can write how to move the database in linux ?
Re: Question about installation
Posted:
Fri Dec 07, 2012 11:06 pm
by hairlesshobo
Linux is easy, just edit the SUBSONIC_HOME variable in the bash file (.sh) to the location you want it to be, and then move the folder to that location.
Re: Question about installation
Posted:
Sat Dec 08, 2012 11:23 am
by xenool
ty
Re: Question about installation
Posted:
Sat Dec 08, 2012 1:19 pm
by hairlesshobo
Not a problem. Did it work like you wanted?