cPanel INSTALLATIONS

How to install Solr on cPanel server

install solr
install solr

How to install Solr on cPanel server

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 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 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:

 
http://<Server_IP_Address>:8983/solr

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!

If you like this post and wish to receive more articles from us, please like our FB page: Grepitout

Your suggestions and feedbacks will encourage us and help to improve further, please feel free to write your comments.

For more details on our services, please drop us an E-mail at info@grepitout.com

5 Comments

Click here to post a comment

Topics