Home  >  Article  >  Backend Development  >  替php安装sphinx扩展

替php安装sphinx扩展

WBOY
WBOYOriginal
2016-06-13 11:54:291367browse

为php安装sphinx扩展

1、安装 libsphinxclient

(具体版本以自己安装的版本为准)

cd /usr/local/src/coreseek-4.1-beta/csft-4.1/api/libsphinxclient

sh buildconf.sh?

./configure

make && make install

?

2、安装 php 的扩展 sphinx

(http://pecl.php.net/package/sphinx?,在这里选择自己想要安装的版本)

wget http://pecl.php.net/get/sphinx-1.1.0.tgz

tar -xvzf sphinx-1.1.0.tgz

cd sphinx-1.1.0

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config

make &&?make install

?

3、修改php.ini

(在php.ini后面最后一行添加扩展,如下格式)

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

[sphinx]

extension=sphinx.so

?

4、重新启动apache或php-fpm,就OK了

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
Previous article:php轮换数组内元素Next article:PHPEXCEL如何使用,