Page 1 of 1

Customizing install on linux

PostPosted: Sun Oct 04, 2009 6:29 am
by kapz
I have successfully installed the Subsonic standalone on my linux computer. I did customize the subsonic.sh and every time I reboot and start subsonic, it thinks its the first time I have run the application and wants me to set an admin password. All music folders and settings are like a fresh install.

my subsonic.sh
Code: Select all
JAVA_HOME=/usr/lib/java
SUBSONIC_HOME=/boot/subsonic_home/data
SUBSONIC_HOST=0.0.0.0
SUBSONIC_PORT=22889
SUBSONIC_CONTEXT_PATH=/subsonic
SUBSONIC_MAX_MEMORY=256
SUBSONIC_PIDFILE=
SUBSONIC_DEFAULT_MUSIC_FOLDER=
SUBSONIC_DEFAULT_PODCAST_FOLDER=/boot/subsonic_home/data/Podcast
SUBSONIC_DEFAULT_PLAYLIST_FOLDER=/boot/subsonic_home/data/playlists


My startup script
Code: Select all
installpkg /boot/subsonic_home/jre-6u6-i586-3.tgz
/boot/subsonic_home/standalone/subsonic.sh


I'm a complete n00b at linux so bare with me.

Another question, each time I run subsonic.sh it starts another process, right (the pid number)? Do I need to kill previous processes to a have changes reflected on the server?

PostPosted: Sun Oct 04, 2009 9:29 am
by jigsaw
Which distro are you on?

PostPosted: Sun Oct 04, 2009 3:00 pm
by kapz
I'm actually running unRaid which is a "slimmed down version of slackware"

The default subsonic.sh creates the subsonic db/properties/ect in /vat/subsonic which will be re-created each time the computer reboots. I set the subsonic_home path to /boot/subsonic_home/data/ (boot is the root of the flash drive).

I can see thumbnails and play lists being save to this new location, but after a reboot subsonic doesn't seem to be looking in that directory even though its specified in subsonic.sh

This has to be a simple issue I would think.

PostPosted: Sun Oct 04, 2009 3:07 pm
by jigsaw
I think the problem is this one:
Code: Select all
installpkg /boot/subsonic_home/jre-6u6-i586-3.tgz
/boot/subsonic_home/standalone/subsonic.sh


If you unpack the tgz every time you start subsonic then yes, all your settings will be reset back to standard installation. E.g. the subsonic_home-variable which as you mentioned is by default pointing to /var/subsonic

Could you try simply running the subsonic.sh to start it up and see if that doesn't do the trick? Not familiar with unRaid so I might be out of bounds :)

PostPosted: Sun Oct 04, 2009 8:09 pm
by kapz
jigsaw,

installpkg /boot/subsonic_home/jre-6u6-i586-3.tgz

is needed since the /usr/lib/java directory doesn't exist after a reboot.

Plus I have noticed in the \db\subsonic.log file every min a new entry is added...
Code: Select all
/*C25404*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C25405*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C25406*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C25407*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C25408*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C25409*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT

PostPosted: Sun Oct 04, 2009 10:33 pm
by jigsaw
Hehe.. My bad.. My eyes read installpkg (...)subsonic(...).tgz so for some reason I thought you were re-installing subsonic everytime you booted :)

Where did you install subsonic the first time? In other words, where is your db-folder where the subsonic database-file is stored etc.
If this is on /boot/somewhere then I think it should survive a reboot.

PostPosted: Sun Oct 04, 2009 10:55 pm
by kapz
I think the first I tried to run subsonic I left the subsonic.sh file alone (except for changing the port). When I realized /var/subsonic would not survive a reboot, I set a path on the flash drive. Is there some "registry" in linux that would hold a pointer to a the old install location (I come from a windows background)?

I want to note that I neglected to "Install dependent packages" for JAVA as the instructions for FreeNAS say to do. Is this important? Subsonic wouldn't run without it I assume.
Code: Select all
$ pkg_add -v -r xtrans
$ pkg_add -v -r xproto
$ pkg_add -v -r xextproto
$ pkg_add -v -r javavmwrapper

PostPosted: Mon Oct 05, 2009 12:03 am
by kapz
Here is some more insight on the subject.

Why do I have to keep reinstalling a user application?

Sindre, what files are added to the linux OS that I might need to save to a non-volatile location before shutting down?

PostPosted: Mon Oct 05, 2009 6:08 am
by jigsaw
Hi kapz

Linux does not have a registry as windows does. I was merely attempting to get you to locate the db-folder where subsonic will write it's settings so that you could make sure this was not still in /var/subsonic.

In any case, to setup a brand new subsonic in a non-default location I would:
1) create folder for subsonic, say /boot/subsonic
2) copy the standalone subsonic.tar.gz to /boot/subsonic
3) untar ( tar -xvf subsonic.tar.gz )
4) modify all paths in subsonic.sh to /boot/subsonic where applicable
5) start it up

After this procedure all settings should be preserved after boot if I've understood the unRaid correctly. There should be a db-folder and a jetty-folder within /boot/subsonic/ and you should also see the two log-files subsonic_sh.log and subsonic.log in /boot/subsonic/.

Hope this helps :)

-jigsaw

PostPosted: Tue Oct 06, 2009 4:21 pm
by kapz
jigsaw,

I was able to get subsonic to work finally between reboots (not really sure how). I moved the install directory to one of the hard disks in the array. It was slow running from a flash drive.

I'm having so much trouble getting transcoding to work now. I need lame, m4a, and flac at least. UnRaid is missing compiler libraries, so I found what I think was one already made. I downloaded lame-3.98.2-1.rh7.rf.i386.rpm and copied the files found inside like so...

/mnt/disk2/SUBSONIC_HOME/transcode/lame
/usr/lib/libmp3lame.so.0
/usr/lib/libmp3lame.so.0.0.0

Both .so files are also in the transcode folder too. When I type 'lame' from a telnet session I get the following error...

"error while loading shared libraries: /usr/lib/libmp3lame.so.0: file is too short"

These might not even be the right files. Would you happen to have working encoding libraries you could send me? :wink:

Does the downsample command in Subsonic stay the same too?

Thank you

PostPosted: Tue Oct 06, 2009 6:40 pm
by jigsaw
Great to hear that you finally made it survive a reboot kapz :) I'm afraid I cannot be of much assistance regarding the libraries as I'm on Fedora and you're on... well.. that's kinda it, I don't know which distro unRaid is based on, hehe. I suggest you start looking about on either the faq, wiki or forum of unRaid to help you with that one.

-jigsaw

PostPosted: Tue Oct 06, 2009 6:47 pm
by kapz
the syslog says: unraid kernel: Linux version 2.6.29.1-unRAID

I do plan to write complete instructions once I figure it all out. I'm installing the packages to compile on unRaid now, but its somewhat trail and error.