Apache Solr is an open source search platform built on top of Apache Lucene™. Its fast and powerful and has many search patterns to manipulate and deliver most relevant results in your application.

Solr is a portable and platform independent search, which means you can move it to any operating system like Ubuntu, Debian, Windows, MacOS and run it with absolutely nothing or very less configuration changes. This contest covers installing Apache Solr in Debian.

This installation procedure has been tested on Debian 7 and Debian 8. It may also work on other versions or other variants of Debian derivatives like Ubuntu.

Apache Solr in executed in Java VM. The latest version of Solr requires Java Run-time Environment (JRE) v8.0+. In Debian repository you can find open-sourced JVM OpenJDK, but its still on version 7. So, you have to install Oracle JVM into your Debian. The following steps will install you both JDK8 and JRE8.

If you don’t have Java 8 installed on your system then follow the instruction on how to install oracle java in Debian or Ubuntu before you proceed. To check you have the required version of JRE use command java -version in your terminal.

Now, open your terminal and follow the instructions below.

1. Download and extract Apache Solr:

wget http://a.mbbsindia.com/lucene/solr/6.0.0/solr-6.0.0.tgz
tar -xvzf ./solr-6.0.0.tgz

 

2. Run Apache Solr:

cd solr-6.0.0
./bin/solr start

Thats it, you are done. The default port of Apache Solr is 8983.

Stopping Apache Solr instances:

./bin/solr stop -all

This will stop all instances of Solr running on your system.