How To Install Apache Solr on CentOS 7

r00t January 4, 2016

apache-solr-logo

In this tutorial we will show you how to install and configuration of Apache Solr on your CentOS 7 server.  For those of you who didn’t know, Apache Solr is an open source enterprise search platform used to easily create search engines which searches websites, files and databases. Its major features include powerful full-text search, faceted search, distributed search, hit highlighting and index replication.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you through the step by step installation Apache Solr in CentOS 7.

Install Apache Solr on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Install the latest available version of Java on your server.

Checking Installed java version:

Step 3. Installing Apache Solr.

First thing to do is to go to Apache Solr’s download page and download the latest stable version of Apache Solr, At the moment of writing this article it is version 5.4.0:

Unpack the Apache Solr archive to the document root directory on your server:

Step 4. Create script for handling the Solr server service.

Create a systemd service for Solr or if you are used to the old init scripts, you can keep using them. Create an init script for the Solr service:

Save the file and make it executable:

You can now start Solr using the following command:

You should also be able to use the ‘service’ command to start,stop and restart Solr:

Step 5. Configure iptables or Firewall.

If you use iptables add a rule to allow access to Solr’s admin section and query Solr data:

Step 6. Accessing Apache Solr.

Apache Solr will be available on HTTP port 8983 by default. Open your favorite browser and navigate to http://yourdomain.com:8983/solr/  or http://server-ip:8983/solr/.

solr-web-admin

Apache Solr

Congratulation’s! You have successfully installed Apache Solr. Thanks for using this tutorial for installing Apache Solr on your CentOS 7 system. For additional help or useful information, we recommend you to check the official Apache Solr web site.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get a best deal!
Share on Google+0Share on Facebook0Tweet about this on TwitterShare on Tumblr0Share on StumbleUpon464Share on Reddit1Pin on Pinterest2
The Tags:

Leave a Comment