How to upgrade subsonic on Fedora
Posted: Sun Oct 04, 2009 2:23 pm
This is a short and simple tutorial which explains how you may upgrade your subsonic installation without loosing any settings or configurations. It's not complicated but there's been some posts with questions regarding this in the past so here goes:
In this case I'm presenting upgrade of Subsonic 3.7 to 3.8.beta1 on Fedora 11 using the standalone version. However the procedure is identical on any minor or major version upgrades of the standalone version. Upgrades of the windows installer or the WAR-installation is not covered by this tutorial.
The steps include:
1. Download new version
2. Backup files from previous version
3. Stop Subsonic
4. Upgrade
5. Check differences to preserve local modifications
6. Start Subsonic
1. Download new version
Find the latest version from the Official Subsonic Site and download to a local folder.
Copy the tar.gz to your SUBSONIC_HOME ( assuming /var/subsonic here ) and chown to subsonic user ( assuming subsonic here ).
2. Backup files from previous version
3. Stop Subsonic
4. Upgrade
Unpack the tar.gz
5. Check differences to preserve local modifications
Here you can see what has changed after the upgrade. A couple of things always important make sure is correct is the environment variables SUBSONIC_CONTEXT_PATH and SUBSONIC_MAX_MEMORY. I access subsonic through Apache and under the context path "/subsonic" so I need to fix that one. By default Subsonic only uses 64MB, but my installation uses 128MB for better performance. In addition I have changed the folder-variables to use the SUBSONIC_HOME-variable instead of being hard-coded ( cause it's not located right under /var on my installation ). Next is the consistent "bug" IMHO where subsonic overwrites the log-file at startup. I always change this to append by switching the ">" with ">>".
Any other alterations which does not affect anything you might have altered yourself should be kept in the new subsonic.sh - this is changes made by the developer.
After you've fixed the modifications you do a last check
Looks ok.
6. Start Subsonic
Optional: If you have Subsonic running behind Apache with mod_proxy you may need to reload Apache after upgrading.
And that should be it
If you experience any problems be sure to check your logs and file-permissions.
In this case I'm presenting upgrade of Subsonic 3.7 to 3.8.beta1 on Fedora 11 using the standalone version. However the procedure is identical on any minor or major version upgrades of the standalone version. Upgrades of the windows installer or the WAR-installation is not covered by this tutorial.
The steps include:
1. Download new version
2. Backup files from previous version
3. Stop Subsonic
4. Upgrade
5. Check differences to preserve local modifications
6. Start Subsonic
1. Download new version
Find the latest version from the Official Subsonic Site and download to a local folder.
- Code: Select all
$ wget http://prdownloads.sourceforge.net/subsonic/subsonic-3.8.beta1-standalone.tar.gz
Copy the tar.gz to your SUBSONIC_HOME ( assuming /var/subsonic here ) and chown to subsonic user ( assuming subsonic here ).
- Code: Select all
$ sudo cp subsonic-3.8.beta1-standalone.tar.gz /var/subsonic/
$ cd /var/subsonic
$ sudo chown subsonic.subsonic subsonic-3.8.beta1-standalone.tar.gz
2. Backup files from previous version
- Code: Select all
$ sudo -u subsonic mkdir backup-3.7
$ sudo -u subsonic cp subsonic.* backup-3.7/
3. Stop Subsonic
- Code: Select all
$ sudo service subsonic stop
4. Upgrade
Unpack the tar.gz
- Code: Select all
$ sudo -u subsonic tar -xvf subsonic-3.8.beta1-standalone.tar.gz
Getting Started.html
LICENSE.TXT
README.TXT
subsonic.war
subsonic-booter-jar-with-dependencies.jar
subsonic.bat
subsonic.sh
5. Check differences to preserve local modifications
- Code: Select all
$ sudo diff -uw backup-3.7/subsonic.sh subsonic.sh
+++ subsonic.sh 2009-07-01 20:23:10.000000000 +0200
--- backup-3.7/subsonic.sh 2009-10-04 15:52:09.636181221 +0200
@@ -9,12 +9,12 @@
SUBSONIC_HOME=/var/subsonic
SUBSONIC_HOST=0.0.0.0
SUBSONIC_PORT=8080
+SUBSONIC_CONTEXT_PATH=/
+SUBSONIC_MAX_MEMORY=64
-SUBSONIC_CONTEXT_PATH=/subsonic
-SUBSONIC_MAX_MEMORY=128
SUBSONIC_PIDFILE=
+SUBSONIC_DEFAULT_MUSIC_FOLDER=/var/music
+SUBSONIC_DEFAULT_PODCAST_FOLDER=/var/music/Podcast
+SUBSONIC_DEFAULT_PLAYLIST_FOLDER=/var/playlists
-SUBSONIC_DEFAULT_MUSIC_FOLDER=$SUBSONIC_HOME/music
-SUBSONIC_DEFAULT_PODCAST_FOLDER=$SUBSONIC_HOME/Podcast
-SUBSONIC_DEFAULT_PLAYLIST_FOLDER=$SUBSONIC_HOME/playlists
usage() {
echo "Usage: subsonic.sh [options]"
@@ -103,11 +103,11 @@
+Dsubsonic.defaultMusicFolder=${SUBSONIC_DEFAULT_MUSIC_FOLDER} \
+Dsubsonic.defaultPodcastFolder=${SUBSONIC_DEFAULT_PODCAST_FOLDER} \
+Dsubsonic.defaultPlaylistFolder=${SUBSONIC_DEFAULT_PLAYLIST_FOLDER} \
+ -jar subsonic-booter-jar-with-dependencies.jar > ${LOG} 2>&1 &
- -jar subsonic-booter-jar-with-dependencies.jar >> ${LOG} 2>&1 &
# Write pid to pidfile if it is defined.
if [ $SUBSONIC_PIDFILE ]; then
echo $! > ${SUBSONIC_PIDFILE}
fi
+echo Started Subsonic [PID $!, ${LOG}]
-echo Started Subsonic [PID $!]
Here you can see what has changed after the upgrade. A couple of things always important make sure is correct is the environment variables SUBSONIC_CONTEXT_PATH and SUBSONIC_MAX_MEMORY. I access subsonic through Apache and under the context path "/subsonic" so I need to fix that one. By default Subsonic only uses 64MB, but my installation uses 128MB for better performance. In addition I have changed the folder-variables to use the SUBSONIC_HOME-variable instead of being hard-coded ( cause it's not located right under /var on my installation ). Next is the consistent "bug" IMHO where subsonic overwrites the log-file at startup. I always change this to append by switching the ">" with ">>".
Any other alterations which does not affect anything you might have altered yourself should be kept in the new subsonic.sh - this is changes made by the developer.
After you've fixed the modifications you do a last check
- Code: Select all
$ sudo diff -uw backup-3.7/subsonic.sh subsonic.sh
--- backup-3.7/subsonic.sh 2009-10-04 15:52:09.636181221 +0200
+++ subsonic.sh 2009-10-04 15:54:17.348520998 +0200
@@ -110,4 +110,4 @@
echo $! > ${SUBSONIC_PIDFILE}
fi
-echo Started Subsonic [PID $!]
+echo Started Subsonic [PID $!, ${LOG}]
Looks ok.
6. Start Subsonic
- Code: Select all
$ sudo service subsonic start
Starting Subsonic Media Streamer Started Subsonic [PID 7840, /var/subsonic//subsonic_sh.log]
[ OK ]
Optional: If you have Subsonic running behind Apache with mod_proxy you may need to reload Apache after upgrading.
- Code: Select all
$ sudo service httpd reload
Reloading httpd: [ OK ]
And that should be it
If you experience any problems be sure to check your logs and file-permissions.