Merge Pull Request #96 into develop

master
Eugene E. Kashpureff Jr 8 years ago
commit 3dbb8ec847
  1. 66
      BUILD.md
  2. 135
      INSTALL.md
  3. 111
      documentation/INSTALL.md

@ -0,0 +1,66 @@
<!--
# BUILD.md
# Libresonic/libresonic
-->
Requirements
------------
* Recent version of [Maven](http://maven.apache.org/).
* A JDK installation. 1.8.x series of OpenJDK or Oracle JDK 8+ should work.
* Optional: lintian and fakeroot, for .deb package
* Test as follows:
```
$ which mvn
/usr/local/bin/mvn
$ echo $JAVA_HOME
/usr/lib/jvm/java-1.8.0-openjdk.x86_64
$
```
Now you can clone a copy of this repository:
```
$ git clone git://github.com/Libresonic/libresonic.git
$ cd libresonic
$
```
Standalone WAR
--------------
At this point you are ready to build the basic Libresonic WAR. This is required for all the other build targets, so you should do it before proceeding.
```
$ mvn package
<lots of buildspam>
[INFO] Building war: /path/to/repo/libresonic/libresonic-main/target/libresonic.war
<more buildspam>
$
```
Tomcat Installation
-------------------
The WAR may be copied directly to a Tomcat server's webapps/ directory and deployed.
```
$ cp libresonic-main/target/libresonic.war /var/lib/tomcat6/webapps/
$
```
Packaged .deb
-------------
You can furthermore go ahead to create a .deb suitable for installation on Debian or Ubuntu. These instructions should similarly work with rpm(for RedHat/CentOS or Fedora), but it is has not been tested.
```
$ mvn -P full -pl libresonic-booter -am install
$ mvn -P full -pl libresonic-installer-debian/ -am install
$ sudo dpkg -i ./libresonic-installer-debian/target/libresonic-*.deb
$
```
Good luck!

@ -2,65 +2,110 @@
# INSTALL.md
# Libresonic/libresonic
-->
Requirements
------------
* Recent version of [Maven](http://maven.apache.org/).
# Installing Libresonic
This document is designed to explain how to install LibreSonic as a Tomcat module, on a computer running Linux. As the project expands, this guide will also expand to include other operating systems.
## Installing From Pre-Compiled Package
### Prerequisites
In order to install and run Libresonic, you will need:
* A JDK installation. 1.8.x series of OpenJDK or Oracle JDK 8+ should work.
* A running [Tomcat](http://tomcat.apache.org/) server. If you're unfamiliar with Tomcat, there are many [guides](https://www.linode.com/docs/websites/frameworks/apache-tomcat-on-ubuntu-16-04) on it.
### Download Libresonic
Daily WAR files are built by Jenkins and available [here](https://jenkins.zifnab.net/job/libresonic/), curtesy of [zifnab06](https://github.com/zifnab06).
1. Download the latest war file:
wget https://jenkins.zifnab.net/job/libresonic/lastSuccessfulBuild/artifact/.repository/org/libresonic/player/libresonic-main/6.1.beta1/libresonic-main-6.1.beta1.war -O /var/lib/tomcat8/webapps/libresonic.war
Note that this command copies the war file directly to the Tomcat webapps directory, and renames it to `libresonic.war`.
2. Create the libresonic directory and assign ownership to the Tomcat system user (if running tomcat as a service):
mkdir /var/libresonic
chown tomcat8:tomcat8 /var/libresonic/
3. Start Tomcat, or restart it if running as a service, as in the example below using Systemd:
systemctl restart tomcat8.service
Note that it may take ~30 seconds after the service restarts for Tomcat to fully deploy the app. You can monitor /var/log/tomcat8/catalina.out for the following message:
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.
## Installing From Source
### Prerequisites
In order to build, install, and run Libresonic, you will need:
* A recent version of [Maven](http://maven.apache.org/).
* A JDK installation. 1.8.x series of OpenJDK or Oracle JDK 8+ should work.
* Optional: lintian and fakeroot, for .deb package
* Test as follows:
* A running [Tomcat](http://tomcat.apache.org/) server. If you're unfamiliar with Tomcat, there are many [guides](https://www.linode.com/docs/websites/frameworks/apache-tomcat-on-ubuntu-16-04) on it.
On a Debian-based system, you can install all these prerequisites at once with:
apt-get update; apt-get install tomcat8 openjdk-7-jdk maven
### Test Your System
1. Confirm your Maven installation:
which mvn
2. Confirm that the $JAVA_HOME environment variable is set:
echo $JAVA_HOME
3. If Java is installed, but the `JAVA_HOME` variable not set, be sure to [set it](http://www.cyberciti.biz/faq/linux-unix-set-java_home-path-variable/) before you continue.
### Download and Build Libresonic
1. Clone the Libresonic repo:
git clone git://github.com/Libresonic/libresonic.git
cd libresonic
If you don't have a GitHub account, use https://github.com/Libresonic/libresonic.git instead.
```
$ which mvn
/usr/local/bin/mvn
$ echo $JAVA_HOME
/usr/lib/jvm/java-1.8.0-openjdk.x86_64
$
```
2. At the time of this writing, we reccomend building from the development branch, as Libresonic has not had a stable release since being forked.
Now you can clone a copy of this repository:
git checkout develop
```
$ git clone git://github.com/Libresonic/libresonic.git
$ cd libresonic
$
```
3. Using Maven, build Subsonic:
Standalone WAR
--------------
mvn package
At this point you are ready to build the basic Libresonic WAR. This is required for all the other build targets, so you should do it before proceeding.
4. You should know have a war file:
```
$ mvn package
<lots of buildspam>
[INFO] Building war: /path/to/repo/libresonic/libresonic-main/target/libresonic.war
<more buildspam>
$
```
ls libresonic-main/target/libresonic.war
libresonic-main/target/libresonic.war
Tomcat Installation
-------------------
5. Copy the war file to the Tomcat webapps directory:
The WAR may be copied directly to a Tomcat server's webapps/ directory and deployed.
cp libresonic-main/target/libresonic.war /var/lib/tomcat8/webapps
```
$ cp libresonic-main/target/libresonic.war /var/lib/tomcat6/webapps/
$
```
6. Create the libresonic directory and assign ownership to the Tomcat system user (if running tomcat as a service):
mkdir /var/libresonic
chown tomcat8:tomcat8 /var/libresonic/
Packaged .deb
-------------
7. Start Tomcat, or restart it if running as a service, as in the example below using Systemd:
You can furthermore go ahead to create a .deb suitable for installation on Debian or Ubuntu. These instructions should similarly work with rpm(for RedHat/CentOS or Fedora), but it is has not been tested.
systemctl restart tomcat8.service
```
$ mvn -P full -pl libresonic-booter -am install
$ mvn -P full -pl libresonic-installer-debian/ -am install
$ sudo dpkg -i ./libresonic-installer-debian/target/libresonic-*.deb
$
```
Note that it may take ~30 seconds after the service restarts for Tomcat to fully deploy the app. You can monitor /var/log/tomcat8/catalina.out for the following message:
Good luck!
INFO: Deployment of web application archive /var/lib/tomcat8/webapps/libresonic.war has finished in 46,192 ms
8. 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.

@ -0,0 +1,111 @@
<!--
# INSTALL.md
# Libresonic/libresonic
-->
# Installing Libresonic
This document is designed to explain how to install LibreSonic as a Tomcat module, on a computer running Linux. As the project expands, this guide will also expand to include other operating systems.
## Installing From Pre-Compiled Package
### Prerequisites
In order to install and run Libresonic, you will need:
* A JDK installation. 1.8.x series of OpenJDK or Oracle JDK 8+ should work.
* A running [Tomcat](http://tomcat.apache.org/) server. If you're unfamiliar with Tomcat, there are many [guides](https://www.linode.com/docs/websites/frameworks/apache-tomcat-on-ubuntu-16-04) on it.
### Download Libresonic
Daily WAR files are built by Jenkins and available [here](https://jenkins.zifnab.net/job/libresonic/), curtesy of [zifnab06](https://github.com/zifnab06).
1. Download the latest war file:
wget https://jenkins.zifnab.net/job/libresonic/lastSuccessfulBuild/artifact/.repository/org/libresonic/player/libresonic-main/6.1.beta1/libresonic-main-6.1.beta1.war -O /var/lib/tomcat8/webapps/libresonic.war
Note that this command copies the war file directly to the Tomcat webapps directory, and renames it to `libresonic.war`.
2. Create the libresonic directory and assign ownership to the Tomcat system user (if running tomcat as a service):
mkdir /var/libresonic
chown tomcat8:tomcat8 /var/libresonic/
3. Start Tomcat, or restart it if running as a service, as in the example below using Systemd:
systemctl restart tomcat8.service
Note that it may take ~30 seconds after the service restarts for Tomcat to fully deploy the app. You can monitor /var/log/tomcat8/catalina.out for the following message:
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.
## Installing From Source
### Prerequisites
In order to build, install, and run Libresonic, you will need:
* A recent version of [Maven](http://maven.apache.org/).
* A JDK installation. 1.8.x series of OpenJDK or Oracle JDK 8+ should work.
* A running [Tomcat](http://tomcat.apache.org/) server. If you're unfamiliar with Tomcat, there are many [guides](https://www.linode.com/docs/websites/frameworks/apache-tomcat-on-ubuntu-16-04) on it.
On a Debian-based system, you can install all these prerequisites at once with:
apt-get update; apt-get install tomcat8 openjdk-7-jdk maven
### Test Your System
1. Confirm your Maven installation:
which mvn
2. Confirm that the $JAVA_HOME environment variable is set:
echo $JAVA_HOME
3. If Java is installed, but the `JAVA_HOME` variable not set, be sure to [set it](http://www.cyberciti.biz/faq/linux-unix-set-java_home-path-variable/) before you continue.
### Download and Build Libresonic
1. Clone the Libresonic repo:
git clone git://github.com/Libresonic/libresonic.git
cd libresonic
If you don't have a GitHub account, use https://github.com/Libresonic/libresonic.git instead.
2. At the time of this writing, we reccomend building from the development branch, as Libresonic has not had a stable release since being forked.
git checkout develop
3. Using Maven, build Subsonic:
mvn package
4. You should know have a war file:
ls libresonic-main/target/libresonic.war
libresonic-main/target/libresonic.war
5. Copy the war file to the Tomcat webapps directory:
cp libresonic-main/target/libresonic.war /var/lib/tomcat8/webapps
6. Create the libresonic directory and assign ownership to the Tomcat system user (if running tomcat as a service):
mkdir /var/libresonic
chown tomcat8:tomcat8 /var/libresonic/
7. Start Tomcat, or restart it if running as a service, as in the example below using Systemd:
systemctl restart tomcat8.service
Note that it may take ~30 seconds after the service restarts for Tomcat to fully deploy the app. You can monitor /var/log/tomcat8/catalina.out for the following message:
INFO: Deployment of web application archive /var/lib/tomcat8/webapps/libresonic.war has finished in 46,192 ms
8. 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.
Loading…
Cancel
Save