替php安装sphinx扩展

WBOY
Release: 2016-06-13 11:54:29
Original
1366 people have browsed it

为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了

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!