APACHE SOLR ON REDHAT 7 / CENTOS 7

INSTALL AND CONFIGURE APACHE SOLR ON CENTOS 7 / REDHAT 7

Introduction

Apache Solr is a free, opensource and enterprise search platform built on Apache Lucene.It allows us to create a custom search engine that index files, databases, and websites.

The main purpose of Solr is for Scalability and Fault Tolerance.Also many features like Replication, Load balancing, Recovery, Automated failover etc..

Installation

Solr requires Java, So we need to install JAVA.

Before installing Java make sure your system is up to date.

#yum update

Then, Search for available Java packages.

#yum search java |grep openjdk

Output

 

 

 

 

 

 

 

We can simply install the latest version by using the below command:

#yum install java-1.8.0-openjdk* -y

Once installed, Check the java version:

#java -version

 

 

 

Downloading and Installing Apache Solr

Now, We can download the solr 7.1.0 from its official website using the below command:

#cd /usr/local

If wget is not already installed,

#yum install wget -y

#wget http://www-eu.apache.org/dist/lucene/solr/7.1.0/solr-7.1.0.tgz

Now We have to extract the Apache Solr service installer script from the downloaded Solr archive file and run the script using the below command:

You will not see any output for the following command:

#tar xzf solr-7.1.0.tgz solr-7.1.0/bin/install_solr_service.sh –strip-components=2

#bash ./install_solr_service.sh solr-7.1.0.tgz

Output

You will find the output like this:

 

 

 

 

 

Start the Service

Now, start the service of solr to use it:

#service solr start

#service solr status

Firewall

We need to allow solr port 8983 through the firewall to access Solr web interface from outside network.

Make sure you have installed firewalld and the service is running.

#yum install firewalld

#systemctl start firewalld

Now Open the required ports:

#firewall-cmd –permanent –zone=public –add-port=8983/tcp

#firewall-cmd –permanent –zone=public –add-port=80/tcp

#firewall-cmd –reload

Access Solr Web Interface

You can access the Solr web interface using the below URL and By default, it runs on port 8983.

http://serverIPAddress:8983/solr

You will see the following webpage:

 

 

 

 

 

 

 

 

 

That’s All, We have successfully installed Apache Solr on Redhat 7 Linux machine.Thanks for reading this article.