INSTALL AND CONFIGURE APACHE SOLR ON CENTOS 7 / REDHAT 7
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..
Solr requires Java, So we need to install JAVA.
Before installing Java make sure your system is up to date.
Then, Search for available Java packages.
#yum search java |grep openjdk
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:
Downloading and Installing Apache Solr
Now, We can download the solr 7.1.0 from its official website using the below command:
If wget is not already installed,
#yum install wget -y
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
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
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
Access Solr Web Interface
You can access the Solr web interface using the below URL and By default, it runs on port 8983.
You will see the following webpage: