Install SOLR 5.x

January 30, 2016 | 1600 views | Comments

Since SOLR 5.0, a SOLR server can run in standalone. Previous XML configurations and file copying are not necessary anymore.

This new SOLR installation method might be confusing for the "old users" in the beginning, but in the long run, this is actually a more efficient and straightforward way on making a SOLR server run.

On this SOLR installation example, the latest version by the time of writing this tutorial was used, specifically "Apache Solr 5.4.1".

The SOLR server installation examples provided below are done on Windows, Ubuntu, and CentOS.


Summary

  • Installing SOLR on Windows
  • Installing SOLR on CentOS
  • Installing SOLR on Ubuntu

Installing SOLR on Windows


Step 1. Download and install JAVA 8

Get it from the Oracle website.

Step 2. Download the latest zip version of SOLR 5.x

Get it from Apache SOLR website.

Step 3. Extract the downloaded zip file.

In this example, the zip file was extracted to D:\solr-5.4.1.

That's all!

SOLR 5.4.1 has been installed on Windows.

What's Next? Run SOLR server.

Open the windows command prompt (cmd), and browse the bin folder of the extracted zip file (D:\solr-5.4.1\bin).

>D:
>cd D:\solr-5.4.1\bin

Once inside the bin folder, start SOLR server by running the command solr start

D:\solr-5.4.1\bin>solr start

SOLR server is now running at the background, browse "http://localhost:8983/solr" and you will see the main SOLR page.

 

To stop SOLR server, run the following code solr stop.

D:\solr-5.4.1\bin>solr stop

 


Installing SOLR on CentOS 6.x


Step 1. Install JAVA 8

$ yum install java-1.8.0-openjdk

Step 2. Download the latest tgz version of SOLR 5.x

Open a terminal and get it from Apache SOLR website using Wget, save it inside /opt folder.

$ wget -O /opt/solr-5.4.1.tgz http://www.us.apache.org/dist/lucene/solr/5.4.1/solr-5.4.1.tgz

Step 3. Unpack the downloaded tgz file.

$ tar zxf solr-5.4.1.tgz

That's all!

SOLR 5.4.1 has been installed on CentOS.

What's Next? Run SOLR server.

Open a terminal, and inside the unpacked SOLR folder (/opt/solr-5.4.1), run the following command.

bin/solr start

Browse "http://localhost:8983/solr", and SOLR server should be running at the background, making the SOLR main page accessible.

 

To stop SOLR server, run the following code solr stop.

bin/solr stop

 


Installing SOLR on Ubuntu 14.04


Step 1. Install JAVA 7

$ sudo apt-get install openjdk-7-jdk

Step 2. Download the latest tgz version of SOLR 5.x

Using Wget, open a terminal and get it from Apache SOLR website and save it inside /opt folder.

$ sudo wget -O /opt/solr-5.4.1.tgz http://www.us.apache.org/dist/lucene/solr/5.4.1/solr-5.4.1.tgz

Step 3. Unpack the downloaded tgz file.

$ sudo tar zxf solr-5.4.1.tgz

That's all!

SOLR 5.4.1 has been installed on CentOS.

What's Next? Run SOLR server.

Open a terminal and run the following command inside the unpacked SOLR folder (/opt/solr-5.4.1).

$ sudo bin/solr start

SOLR server should be running at the background. Browse "http://localhost:8983/solr" and the SOLR main page should be accessible.

 

To stop SOLR server, run the following code solr stop.

$ sudo bin/solr stop

 

Related Tutorials


Must Read