阅读背景:

LAMP+Coreseek中文检索引擎使用详解

来源:互联网 
简要: 一、安装PHP的sphinx扩展: =====================1、安装libsphinxclient================ #linsphinxclient在解压缩出来的coreseek-3.2.14里面 cd /usr/local/src/coreseek/csft-3.2.14/api/libsphinxclient #安装在 /usr/local/sphinxclient ./configure --prefix=/usr/local/sphinxclient make && make install ====================2、安装sphinx的PHP扩展=================== cd /usr/local/src wget https://pecl.php.net/get/sphinx-1.1.0.tgz tar -zxvf sphinx-1.1.0.tgz cd sphinx-1.1.0 # 使用安装php时生成的phpize来生成configure配置文件 /usr/local/php/bin/phpize (或 /usr/bin/phpize) # 具体用哪个要取决于你的phpize文件所在的目录,这时你应该用 whereis phpize 来查看路径 ./configure --with-php-config=/usr/bin/php-config --with-sphinx=/usr/local/sphinxclient # 其中 php-config 和 phpize 所在的目录是相同的,比如上面我用 /usr/bin/phpize,则在这一步我用 ./configure –with-php-config=/usr/bin/php-config。而/usr/local/sphinxclient就是上面的libsphinxclient的安装目录 make && make install #注意,如果你的php版本是5.4,那么在这一步中会出现错误,提示在 sphinx.c:105:2,可以按下面方式修改: #vim sphinx.c,找到105行 #把 retval = std_hnd->read_property(object, member, type TSRMLS_CC); 修改成 retval = std_hnd->read_property(object, member, type TSRMLS_CC, NULL); #重新编译安装 #./configure --with-php-config=/usr/bin/php-config --with-sphinx=/usr/local/sphinxclient #make && make install 简要: 一、安装PHP的sphinx扩展: =====================1、安装lib


你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: