Sphinx/Coreseek安装

Sphinx/Coreseek简介

http://blog.csdn.net/whxblue/article/details/8613680

Sphinx是一个高性能的全文检索引擎,使用C++语言开发,采用GPL协议发布,可购买商业授权,目前的稳定版本是2.1.7。

Coreseek是基于Sphinx的中文全文检索引擎,使用MMSEG算法进行中文分词,并且提供Python数据源。Coreseek采用GPLv2协议发布,可购买商业授权,目前的稳定版本是3.2.14,基于Sphinx-0.9.9,测试版本是4.1,基于Sphinx-2.0.1。(另外,Coreseek官方论坛在2013年的年末称即将发布5.0版本,不过至今无详细消息)


Sphinx/Coreseek安装

下载Coreseek-4.1的源代码

wget http://www.coreseek.cn/uploads/csft/4.0/coreseek-4.1-beta.tar.gz
tar xvf coreseek-4.1.beta.tar.gz
cd coreseek-4.1-beta

解压后发现有三个目录,主要的目录结构如下

coreseek-4.1-beta/
    csft-4.1/           coreseek修改sphinx-2.0.1后的代码
        api/            sphinx searchd[查询API][6]的实现
    mmseg-3.2.14/       libmmseg分词库
    testpack/           测试和配置示例
    README.txt          介绍和安装指南

按照官方的安装指南,依次安装mmseg和csft。如果在configure过程中提示缺少头文件,可通过apt-file查询需要安装的软件包。


安装mmseg-3.2.14

这里完全参考官方的安装指南即可

cd mmseg-3.2.14

./configure --prefix=/apps/svr/mmseg3

checking for vfprintf... yes
checking for waitpid... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: error: cannot find input file: src/Makefile.in
3配置mmseg插件时,将出现Makefile错误

yum -y install libtool
aclocal
libtoolize --force
automake --add-missing
autoconf
autoheader
make clean
上述完成之后,重新运行
./configure --prefix=/apps/svr/mmseg3
会出现如下界面
Configuration:

Source code location: .
Compiler: gcc
Compiler flags: -g -O2
Host System Type: x86_64-unknown-linux-gnu
Install path: /usr/local/mmseg3

See config.h for further configuration information.

make && make install


安装csft-4.1

这里configure的参数和安装指南上稍有区别

 cd csft-4.0.1  
./configure --prefix=/apps/svr/coreseek  --without-unixodbc --with-mmseg --with-mmseg-includes=/apps/svr/mmseg3/include/mmseg/ --with-mmseg-libs=/apps/svr/mmseg3/lib/ --with-mysql

make 时 出错

安装libiconv-1.14

先安装libiconv,用于字符集编码的转换。

wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
tar xvf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure
make && sudo make install && ldconfig


接下来安装----------------sphinx 

参考链接:http://www.sphinxsearch.org/sphinx-tutorial

  • [root@localhost src]# wget http://www.sphinxsearch.com/downloads/sphinx-0.9.9.tar.gz
  • [root@localhost src]# tar zxvf sphinx-0.9.9.tar.gz
  • [root@localhost local]# cd sphinx-0.9.9
  • [root@localhost sphinx-0.9.9]# ./configure –prefix=/usr/local/sphinx #注意:这里sphinx已经默认支持了mysql
  • [root@localhost sphinx-0.9.9]# make && make install # 其中的“警告”可以忽略












评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值