Apache Solr is a popular open source search platform for Web sites. It is built upon a Java library called Lucene. Solr index and search multiple sites and return recommendations for related content. This post will help you to install Solr on the cPanel server.

Please install Java 1.8 by running following command prior to the installation of Apache Solr.

yum install java

Install Solr

Please run the following commands for installing Solr on the cPanel server.

cd /usr/local/src/
wget https://archive.apache.org/dist/lucene/solr/6.6.0/solr-6.6.0.tgz
tar -xvf solr-6.6.0.tgz
cd /usr/local/src/solr-6.6.0/bin/
./install_solr_service.sh /usr/local/src/solr-6.6.0.tgz

Please note that the latest version of Apache Solr needs the Java Runtime Environment (JRE) version 1.8 or higher. If Java 1.8 is not available in your server please try to install Solr 5.4.1. It needs Java 1.7.

You can download the desired version of Solr from Here

Once the installation completed, you can verify it by calling the following link:


Also, you can get the Apache Solr service status by running the following command.

/etc/init.d/solr status

How to install Apache Solr PHP module

First, you need to check libcurl-devel is installed on your server. You can verify this by running following command.

rpm -qa | grep libcurl-devel

If it is not installed, you can simply install it using yum.

yum install libcurl-devel

Then, install PHP Solr module using PECL.

pecl install solr

Verify the installation using the following command.

php -m | grep solr

That’s it!

Was this answer helpful? 0 Users Found This Useful (0 Votes)