coreseek(sphinx+mmseg3),php下sphinx扩展安装和php示例

搭建coreseek(sphinx+mmseg3)安装

[第一步] 先安装mmseg3
 1     cd /root/install  
 2     wget http://www.coreseek.cn/uploads/csft/4.0/coreseek-4.1-beta.tar.gz  
 3     tar zxvf coreseek-4.1-beta.tar.gz  
 4       
 5     cd coreseek-4.1-beta  
 6     cd mmseg-3.2.14  
 7     ./bootstrap  
 8     ./configure --prefix=/server/mmseg3  
 9     make && make install  
10       
11     遇到的问题:  
12     error: cannot find input file: src/Makefile.in  
13     或者遇到其他类似error错误时...  
14       
15     解决方案:  
16     依次执行下面的命令,我运行'aclocal'时又出现了错误,解决方案请看下文描述  
17       
18     yum -y install libtool  
19       
20     aclocal  
21     libtoolize --force  
22     automake --add-missing  
23     autoconf  
24     autoheader  
25     make clean  

安装好'libtool'继续从'aclocal'开始执行上面提到的一串命令,执行完后再运行最开始的安装流程即可。

[第二步] 安装coreseek
 1     ##安装coreseek  
 2     $ cd csft-3.2.14 或者 cd csft-4.0.1 或者 cd csft-4.1  
 3     $ sh buildconf.sh                                         #输出的warning信息可以忽略,如果出现error则需要解决  
 4     $ ./configure --prefix=/server/coreseek  --without-unixodbc --with-mmseg --with-mmseg-includes=/server/mmseg3/include/mmseg/ --with-mmseg-libs=/server/mmseg3/lib/ --with-mysql  
 5     ##如果提示mysql问题,可以查看MySQL数据源安装说明   http://www.coreseek.cn/product_install/install_on_bsd_linux/#mysql  
 6     $ make && make install  
 7     $ cd ..
 9       
10     ##命令行测试mmseg分词,coreseek搜索(需要预先设置好字符集为zh_CN.UTF-8,确保正确显示中文)  
11     $ cd /root/install/coreseek-4.1-beta/testpack  
12     $ cat /root/install/coreseek-4.1-beta/testpack/var/test/test.xml    #此时应该正确显示中文  
13     $ /server/mmseg3/bin/mmseg -d /server/mmseg3/etc /root/install/coreseek-4.1-beta/testpack/var/test/test.xml
14 $ /server/coreseek/bin/indexer -c /root/install/coreseek-4.1-beta/testpack/etc/csft.conf --all #此时应该首先修改csft.conf里的配置参数(否则会报错)
15 $ /server/coreseek/bin/search -c /root/install/coreseek-4.1-beta/testpack/etc/csft.conf 网络搜索

出现这个 xmlpipe2 support NOT compiled in. To use xmlpipe2, install missing XML libra  错误

执行以下命令:

  1. yum -y install expat expat-devel  


依次安装后,从新编译coreseek,然后再生成索引,就可以通过了。

结果如下:

 1     Coreseek Fulltext 4.1 [ Sphinx 2.0.2-dev (r2922)]    
 2     Copyright (c) 2007-2011,    
 3     Beijing Choice Software Technologies Inc (http://www.coreseek.com)    
 4        
 5     using config file 'etc/csft.conf'...    
 6     index 'xml': query '网络搜索 ': returned 1 matches of 1 total in 0.000 sec    
 7        
 8     displaying matches:    
 9     1. document=1, weight=1590, published=Thu Apr  1 07:20:07 2010, author_id=1    
10        
11     words:    
12     1. '网络': 1 documents, 1 hits    
13     2. '搜索': 2 documents, 5 hits    

 

posted on 2014-08-12 11:03 禅茶自在 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/phptea/p/3906811.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值