Solr Installation

Pre Requirements

1) A machine with Ubuntu 14.04 LTS operating system installed.

2) Apache Solr 5.4.0 software (Download Here)

Apache Solr Installation

The following steps to install Solr on your machine.

Installation Steps

Step 1 – Installing java 7. Open a terminal (CTRL + ALT + T) and type the following sudo command.

$ sudo apt-get install openjdk-7-jdk

Check it installed properly or not.

$ java -version

Step 2 – Creating solr directory. Open a terminal (CTRL + ALT + T) and type the following sudo command.

$ sudo mkdir /usr/local/solr

Step 3 – Change the ownership and permissions of the directory /usr/local/solr. Here ‘hduser’ is an Ubuntu username.

$ sudo chown -R hduser /usr/local/solr
$ sudo chmod -R 755 /usr/local/solr

Step 4 – Change the directory to /home/hduser/Desktop , In my case the downloaded solr-5.4.0.tgz file is in /home/hduser/Desktop folder. For you it might be in /downloads folder check it.

$ cd /home/hduser/Desktop/

Step 5 – Untar the solr-5.4.0.tgz file.

$ tar xzf solr-5.4.0.tgz

Step 6 – Move the contents of solr-5.4.0 folder to /usr/local/solr

$ mv solr-5.4.0/* /usr/local/solr

Step 7 – Change the directory to /usr/local/solr

$ cd /usr/local/solr

Step 8 – Starting the Solr.

$ bin/solr start

Step 9 – Check the web UI here. Open a browser and type the following URL. Please note that the Default Port Number for Solr is : 8983

Step 10 – Stoping the Solr.

$ bin/solr stop

Other ways to start and stop Solr

To start

$ bin/solr start -p 8984

To stop

$ bin/solr stop -p 8983

To check status

$ bin/solr status


$ bin/solr -help
$ bin/solr start -help

Have any Question or Comment?

Leave a Reply

Your email address will not be published. Required fields are marked *