Bobby's Blog

An Easy Way to Install Solr 6.x on a Linux Server

Apache Solr Installation Guide

In this tutorial we will install Solr 6.6.4 on a CentOS server. This is quite simple as now Solr comes with a cool automated installation script, it detects the OS and eventually creates the solr user for the daemon.

Note: Before getting started make sure that you have root/sudo access to your server.

What is Solr?

Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world’s largest internet sites. For more information you can take a look at the Solr official website at:

Choosing your Solr version

You can get the exact Solr version that you need from the archive at:

In my case I would go with 6.6.4:


1. First let’s start with installing Java:

Check your Java version like this:

2. You would also need to install lsof as this script needs it to determine if Solr is listening on a specific port.

3. After that we need the Solr installation files from:

4. Extracted the files:

5. Then run the cool Solr installation script, it detect the OS and eventually creates the solr user for the daemon:

You would get the following output:

Solr installation

MySQL connector

Also here’s how to install the MySQL connector incase you need it.

First download the required version:


This is pretty much it, now Solr should be installed at /opt/solr. You should also now have a startup script that you could use to start/stop/restart the solr service:

Solr Status

As a good practice I would suggest locking the Solr port via your firewall so that only you could access it directly.


If you want to learn more about Solr I would strongly recommend this book here:

As always feel free to reach out to me at any time 🙂

About the author


Linux System Administrator