Home > Backend Development > PHP Tutorial > 安装php-solr扩展

安装php-solr扩展

PHP中文网
Release: 2023-02-28 17:26:01
Original
2011 people have browsed it

安装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
Copy after login

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

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


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

extension_dir = "./"
Copy after login

修改为

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

并添加一行

extension=solr.so
Copy after login

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

相关文章:

php的solr的操作类及demo

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

集成 PHP 应用和 Solr 搜索引擎

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template