安装php的sphinx扩展模块

转自

http://blog.csdn.net/fenglailea/article/details/38115821

 

首先你必须已经安装过了sphinx

如何安装sphinx请看:http://blog.csdn.net/fenglailea/article/details/38111661#t0

进入sphinx 安装目录api/libsphinxclient

#libsphinxclient 安装(php模块需要)

cd sphinx-2.2.3-beta/api/libsphinxclient
./configure --prefix=/usr/local/sphinx
make && make install
安装PHP Sphinx 扩展模块

#如果没有扩展安装包,先下载
wget http://pecl.php.net/get/sphinx-1.3.2.tgz
tar zxvf sphinx-1.3.2.tgz
cd sphinx-1.3.2
/var/lanmps/php/bin/phpize
./configure --with-php-config=/var/lanmps/php/bin/php-config --with-sphinx=/usr/local/sphinx
make
make install

PHP配置

修改PHP.ini,
1.如果以前已配置过扩展目录则PASS

#extension_dir 目录根据 sphinx 扩展安装成功后提示的目录
extension_dir = "/var/lanmps/php/lib/php/extensions/no-debug-non-zts-20121212/"
2.配置文件里启用扩展

[sphinx]
extension=sphinx.so

posted on 2017-08-23 08:59  dongruiha  阅读(522)  评论(0编辑  收藏  举报

导航