How to Install Apache Solr in Linux

Solr Apache Solr Install Linux

Apache Solr is a open source search platform built from the Apache Lucence project. Apache Solr is used as powerful text search, database integration, documents handling & clustering.

Apache Solr


Pre-requisite for installation of Solr is to have Java installed in the server. Lets check whether java is installed or not using below command

# java -version
java version "1.7.0_91"
OpenJDK Runtime Environment (amzn- u91-b00)
OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode)

If Java is not installed, Follow this blog to install java – How to Install Java JDK in Linux

Installation of Solr in Linux with 5 Easy Steps

Step 1: Download the Solr package

Download the Apache Solr Package from the Apache mirror site using wget command

# cd /opt
# wget
# tar -xvzf solr-5.3.1.tgz

Delete the tar.gz file to space the disk space

# rm -f solr-5.3.1.tgz


Step 2: Configuration to be done!

Copy the Startup Script to /etc/init.d/ &  solr conf file to /var/solr/

# mv solr-5.3.1 solr
# cp /opt/solr/bin/init.d/solr /etc/init.d/
# cp /opt/solr/bin/ /var/solr/

Create Directory for Data directory & Logs

# mkdir -p /var/solr/data
# mkdir /var/solr/logs

Write the configuration below to file to the End of the file

# vim /var/solr/

Step 3: Create Solr user account & Permissions

we need to create solr user account & make the process running as solr as described in init.d/solr script,

# useradd solr
# chown -R solr:solr /opt/solr /var/solr/

One Comments

  • KeilaSSalehi

    March 7, 2016

    Hey there! I recently would like to give you a huge thumbs up for your personal
    great info you have here with this post. I’ll be returning to your internet site for more

Leave a Reply