Home  >  Article  >  Backend Development  >  安装php-solr扩展

安装php-solr扩展

PHP中文网
PHP中文网Original
2017-03-24 13:25:331962browse

安装php-solr扩展

下载安装:

libxml2 2.6.31或以上版本

libcurl 7.18.0 或以上版本

到php官网下载solr: http://pecl.php.net/package/solr

然后:

/usr/local/php5/bin/phpize 
./configure --with-php-config=/usr/local/php5/bin/php-config 
sudo make 
sudo make test 
sudo make install

安装完后会有类似这样的提示:

Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20090626/


把这个记住,然后修改php.ini(vim /usr/local/etc/php.ini ),把

extension_dir = "./"

修改为

extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/"

并添加一行 

extension=solr.so

注意:/usr/local/php5/bin/phpize 可能会出现变化,具体根据php的安装位置而定。

相关文章:

php的solr的操作类及demo

搜索方案 solr+php如何安装配置?

集成 PHP 应用和 Solr 搜索引擎

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn