Home » Centos/RHEL » install apache solr on centos and ubuntu

install apache solr on centos and ubuntu

Apache solr is AN open supply enterprise look stage, that consists in Java, from the Apache Lucene extend.
Its real components incorporate full-content inquiry, hit highlight, faceted hunt, continuous ordering,
dynamic bunching, info combination, NoSQL features[1] and wealthy record (e.g., Word, PDF) taking care of.
Giving seized pursuit and list replication, Solr is meant for ability and blame tolerance.[2] Solr is that
the second-most noted enterprise web searcher when Elasticsearch.[3]
Solr keeps running as a standalone full-content hunt server. It utilizes the Lucene Java look library at its
center for full-content ordering and request, and has REST-like HTTP/XML and JSON Apis that create it usable
from most distinguished programming dialects. Solr’s outside setup permits it to be custom-made to several
types of utilization while not Java committal to writing, and it’s a module style to bolster a lot of propelled
customization.Apache Lucene and Apache Solr area unit each delivered by an analogous Apache computer code Foundation
improvement cluster since the 2 tasks were converged in 2010. it’s basic to advert to the innovation or things as
Lucene/Solr or Solr/Lucene. In this article you will learn how to install apache solr on centos and ubuntu server.

To Apache solr we need to install java interpreter, So install java frist by using following commands.
cd /usr/local/

[root@linuxpcfix]#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/8u40-b25/jdk-8u40-linux-x64.tar.gz”

–2016-12-26 11:21:59– http://download.oracle.com/otn-pub/java/jdk/8u40-b25/jdk-8u40-linux-x64.tar.gz
Resolving download.oracle.com…,
Connecting to download.oracle.com||:80… connected.
HTTP request sent, awaiting response… 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u40-b25/jdk-8u40-linux-x64.tar.gz [following]
Saving to: “jdk-8u40-linux-x64.tar.gz”

100%[============================================================================================>] 5,307 –.-K/s in 0.001s

2016-12-26 11:22:02 (4.86 MB/s) – “jdk-8u40-linux-x64.tar.gz” saved [5307/5307]

If jdk download gets successful then extract the gz file as given below.

[root@linuxpcfix local]# tar -xvf jdk-8u40-linux-x64.tar.gz
[root@linuxpcfix local]#ln -s jdk1.8.0_40/ java
[root@linuxpcfix local]# java/bin/java -version
java version “1.8.0_40”
Java(TM) SE Runtime Environment (build 1.8.0_40-b25)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
[root@linuxpcfix local]#
[root@drbd1 local]# export JAVA_HOME=/usr/local/java

Now we need to download apache solr on the server. to install apache solr follow below command.

[root@linuxpcfix local]# wget http://archive.apache.org/dist/lucene/solr/6.3.0/solr-6.3.0.tgz
[root@linuxpcfix local]# tar xzf solr-6.3.0.tgz solr-6.3.0/bin/install_solr_service.sh –strip-components=2
[root@linuxpcfix local]# sudo bash ./install_solr_service.sh solr-6.3.0.tgz

Start, Restart, Stop, Status
You can use following command to start,stop and verify the status.

[root@linuxpcfix local]# service solr stop
[root@linuxpcfix local]# service solr start
[root@linuxpcfix local]# service solr status

To verify apache solr installation Create First Solr Collection.
After successful installation of Solr on your system. Create first collection on solr using following command.

[root@linuxpcfix local] sudo su – solr -c “/opt/solr/bin/solr create -c mycollection1 -n data_driven_schema_conf

The Default port of Solr is 8983. You can access Solr dashboard in your web browser and using below url.


I am founder and webmaster of www.linuxpcfix.com and working as a Sr. Linux Administrator (Expertise on Linux/Unix & Cloud Server) and have been in the industry from last 7 years.

Leave a Reply

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


Time limit is exhausted. Please reload the CAPTCHA.

Categorized Tag Cloud