how to configure solr with php

Just now i have configured the solr extension with php. Before installation i had php, mysql and apache working, so i had to install it very carefully but it went very smooth like tequila shot with lemon.

Step 1: first try to execute the following command.

  pecl install -n solr-beta

If all the required extensions are available then it will start otherwise it will show the error for required extensions.

I got error like “sh: phpize: not found ERROR: `phpize’ failed”.
then execute following command add sudo if dont have root permission.
it will install phpize for you.

  [sudo] apt-get install php5-dev

execute following command it will install all pear lib which are required for solr.

apt-get install php-pear

Once done with all the support plugins then install solr extension using step 1.

Step 2: enable the solr extension.
go to directory /etc/php5/apache2/conf.d/ and create solr.ini file.
add following line and restart the apache service.

  extension=solr.so
Share this nice post:

One thought on “how to configure solr with php

  1. We are a group of volunteers and opening a new scheme in our community. Your web site provided us with valuable information to work on. You’ve done a formidable job and our whole community will be grateful to you.

Comments are closed.