From 0a460d6bab126114eb60b555eae36a78855fcd7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Cocula?= Date: Tue, 21 Feb 2017 23:14:18 +0100 Subject: [PATCH 1/2] Add spring boot to INSTALL.md #253 --- documentation/INSTALL.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/documentation/INSTALL.md b/documentation/INSTALL.md index a27b00bc..925ee6ca 100644 --- a/documentation/INSTALL.md +++ b/documentation/INSTALL.md @@ -42,6 +42,44 @@ Daily WAR files are built by Jenkins and available [here](https://jenkins.zifnab 4. In your web browser, navigate to `192.0.2.10:8080/libresonic/`, replacing `192.0.2.0` with your server's IP address, or `127.0.0.1` if installing locally. +## Alternative to Tomcat + +If you'd prefer not to use a Tomcat container, you can also run Libresonic as a standalone application. +Note that, in that case, libresonic will available at `192.0.2.10:8080` (and not `192.0.2.10:8080/libresonic/`). + +Download the Libresonic Pre-Compiled Package as explained above and put it anywhere. Then create the libresonic directory. + +Now you can simply run java against the libresonic.war package. + +Here is a simple shell script that does the job. + +```shell +#!/bin/sh + +JAVA_HOME=/software/java/jdk1.8.0_92 # please change to your java distribution directory + +LIBRESONIC_HOME=/var/libresonic +LIBRESONIC_PIDFILE=${LIBRESONIC_HOME}/libresonic.pid +LOG=${LIBRESONIC_HOME}/libresonic_sh.log +LIBRESONIC_MAX_MEMORY=256 + +echo "LIBRESONIC_HOME = ${LIBRESONIC_HOME}" + +echo "Launch libresonic" +${JAVA_HOME}/bin/java -Xmx${LIBRESONIC_MAX_MEMORY}m \ + -Dlibresonic.home=${LIBRESONIC_HOME} \ + -Djava.awt.headless=true \ + -jar libresonic.war > ${LOG} 2>&1 & + +# Write pid to pidfile if it is defined. +echo "Write pid in ${LIBRESONIC_PIDFILE}" +if [ $LIBRESONIC_PIDFILE ]; then + echo $! > ${LIBRESONIC_PIDFILE} +fi + +echo Started libresonic [PID $!, ${LOG}] +``` + ## Installing From Source ### Prerequisites From 06776d9f0a7d0f863371cc6a8cab4aec0d3d902c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Cocula?= Date: Thu, 23 Feb 2017 21:33:57 +0100 Subject: [PATCH 2/2] Minimal instructions for spring boot installation. --- documentation/INSTALL.md | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/documentation/INSTALL.md b/documentation/INSTALL.md index 925ee6ca..3a0f591b 100644 --- a/documentation/INSTALL.md +++ b/documentation/INSTALL.md @@ -40,44 +40,20 @@ Daily WAR files are built by Jenkins and available [here](https://jenkins.zifnab INFO: Deployment of web application archive /var/lib/tomcat8/webapps/libresonic.war has finished in 46,192 ms -4. In your web browser, navigate to `192.0.2.10:8080/libresonic/`, replacing `192.0.2.0` with your server's IP address, or `127.0.0.1` if installing locally. +4. In your web browser, navigate to `http://IP_ADDRESS:8080/libresonic/`, replacing `IP_ADDRESS` with your server's IP address, or `127.0.0.1` if installing locally. ## Alternative to Tomcat If you'd prefer not to use a Tomcat container, you can also run Libresonic as a standalone application. -Note that, in that case, libresonic will available at `192.0.2.10:8080` (and not `192.0.2.10:8080/libresonic/`). +Note that, in that case, libresonic will available at `http://IP_ADDRESS:8080` (and not `IP_ADDRESS:8080/libresonic/`). Download the Libresonic Pre-Compiled Package as explained above and put it anywhere. Then create the libresonic directory. -Now you can simply run java against the libresonic.war package. +Now you can simply run java against the libresonic.war package using a command like : -Here is a simple shell script that does the job. -```shell -#!/bin/sh - -JAVA_HOME=/software/java/jdk1.8.0_92 # please change to your java distribution directory - -LIBRESONIC_HOME=/var/libresonic -LIBRESONIC_PIDFILE=${LIBRESONIC_HOME}/libresonic.pid -LOG=${LIBRESONIC_HOME}/libresonic_sh.log -LIBRESONIC_MAX_MEMORY=256 - -echo "LIBRESONIC_HOME = ${LIBRESONIC_HOME}" - -echo "Launch libresonic" -${JAVA_HOME}/bin/java -Xmx${LIBRESONIC_MAX_MEMORY}m \ - -Dlibresonic.home=${LIBRESONIC_HOME} \ - -Djava.awt.headless=true \ - -jar libresonic.war > ${LOG} 2>&1 & - -# Write pid to pidfile if it is defined. -echo "Write pid in ${LIBRESONIC_PIDFILE}" -if [ $LIBRESONIC_PIDFILE ]; then - echo $! > ${LIBRESONIC_PIDFILE} -fi - -echo Started libresonic [PID $!, ${LOG}] +``` +java -jar libresonic.war ``` ## Installing From Source