如何安装php请看Linux安装配置php+apache
下载地址:http://pecl.php.net/package/solr
解压后CD到solr目录里
执行已下代码
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make test
n
make install
安装成功后查看
/usr/local/php/bin/php -v 如果出错,要把出错解决了才会成功
安装时出错参考
dpkg -L curl #查看curl安装在哪个路径
运行/usr/local/php/bin/phpize时出现:
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
yum install m4
yum install autoconf
curl出错安装下面
apt-get install curl libcurl3-openssl-dev