下载coreseek 4.0.1:点击下载
http://www.coreseek.cn/uploads/csft/4.0/coreseek-4.0.1-beta.tar.gz
tar xzvf coreseek-4.0.1-beta.tar.gz
cd coreseek-4.0.1-beta
安装mmseg
安装必须的库文件,不然会报错
yum install libtool
cd mmseg-3.2.14
./bootstrap #输出的warning信息可以忽略,如果出现error则需要解决
./configure –prefix=/usr/local/mmseg3
make && make install
cd ..
安装coreseek
cd csft-4.0.1
sh buildconf.sh #输出的warning信息可以忽略,如果出现error则需要解决
./configure –prefix=/usr/local/coreseek –without-unixodbc –with-mmseg –with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ –with-mmseg-libs=/usr/local/mmseg3/lib/ –with-mysql (此时会报错:undefined reference to `libiconv' 在csft安装目录下有个文件夹src,进入然后vi MakeFile 修改将LIBS = -lm -lexpat -L/usr/local/lib 改成 LIBS = -lm -lexpat -liconv -L/usr/local/lib 此时先玩别再执行./configure命令,直接cd .. 然后make && make install)
make && make install
cd ..
测试mmseg分词,coreseek搜索(需要预先设置好字符集为zh_CN.UTF-8,确保正确显示中文)
cd testpack
cat var/test/test.xml #此时应该正确显示中文
/usr/local/mmseg3/bin/mmseg -d /usr/local/mmseg3/etc var/test/test.xml
/usr/local/coreseek/bin/indexer -c etc/csft.conf –all
/usr/local/coreseek/bin/search -c etc/csft.conf 网络搜索
建立全部索引
/usr/local/coreseek/bin/indexer -c /usr/local/coreseek/etc/sphinx.conf –all
开启搜索服务
/usr/local/coreseek/bin/searchd -c /usr/local/coreseek/etc/sphinx.conf
如要停止搜索服务,请使用
/usr/local/coreseek/bin/searchd -c /usr/local/coreseek/etc/sphinx.conf –stop
如要已启动服务,要更新索引,请使用
/usr/local/coreseek/bin/indexer -c /usr/local/coreseek/etc/sphinx.conf –all –rotate
转载请注明:IT运维空间 » linux » Coreseek开源中文检索引擎安装使用
发表评论