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.