Solr 5.2.1 and Java 8 on Debian 8
Debian, Java, Solr | July 14, 2015
Setting up a Solr server has gotten a lot easier than it was in the past. See this article for how to set up a Solr 4 server.
Debian 8 currently packages openjdk-7. While you could just apt-get install openjdk-7-jre-headless and have a working Java for your Solr installation, Java 7 is end of life and the newer Java 8 is the recommended version.
Java 8 is in Jessie's backports. So use that one or install Java 8 from Oracle instead:
mkdir -p /opt/java wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz" tar xvf jdk-8u45-linux-x64.tar.gz -C /opt/java update-alternatives --install /usr/bin/java java /opt/java/jdk1.8.0_45/bin/java 1 update-alternatives --set java /opt/java/jdk1.8.0_45/bin/java
Solr 5 is a standalone server. You no longer need to install a servlet container like Tomcat and deploy a war file. It also comes with an installer script for setting up a production system, this script supports various Linux distributions and creates a separate solr user, installs init scripts etc.
wget http://apache.belnet.be/lucene/solr/5.2.1/solr-5.2.1.tgz tar xvf solr-5.2.1.tgz ./solr-5.2.1/bin/install_solr_service.sh solr-5.2.1.tgz
Solr is now available on port 8983. You can create cores from the web interface or directly from the command line with bin/solr create -c <corename> (like Timothy Potter commented, thanks!).