centos 下 sphinx(coreseek)安装及常见问题
2017-07-13 15:21
495 查看
centos 下 sphinx(coreseek)安装及常见问题
前期准备:libtool-2.4.2.tar.gz 、 autoconf-2.64.tar.bz2 、 automake-1.11.2.tar.gz 、 coreseek-3.2.14.tar.gz
sphinx工具包下载地址
开始安装
安装运行所需编译环境(-y是安装的时候不需确认)yum -y install glibc make gcc g++ gcc-c++ libtool autoconf automake imake mysql-devel libxml2-devel expat-devel
清除以前的autoconf
yum erase autoconf
安装libtool
tar zxvf libtool-2.4.2.tar.gz
./configure
make
make install
安装autoconf
tar jxvf autoconf-2.64.tar.bz2
cd autoconf-2.64
./configure
make
make install
安装automake
tar xzvf automake-1.11.tar.gz
cd automake-1.11
./configure
make
make install
安装mmseg、csft (这两个软件在coreseek文件里)
tar zxvf coreseek-3.2.14.tar.gz
cd coreseek-3.2.14
先安装mmseg (安装过程不出现error就算成功)
cd mmseg-3.2.14
./bootstrap
./configure –prefix=/usr/local/mmseg
make && make install
安装coreseek
cd csft-3.2.14
sh buildconf.sh
./configure –prefix=/usr/local/coreseek –without-unixodbc –with-mmseg –with-mmseg-includes=/usr/local/mmseg/include/mmseg/ –with-mmseg-libs=/usr/local/mmseg/lib/ –with-mysql
make && make install
可能出现的问题
sphinxexpr.cpp:1047:43: error: ‘ExprEval’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
出现这个提示只需要找到csft-3.2.14/src/sphinxexpr.cpp 的 1047行,将ExprEval修改为this->ExprEval之后重新执行 make && make install 即可
测试mmseg分词和coreseek搜索
备注:需要预先设置好字符集为zh_CN.UTF-8,确保正确显示中文。
运行locale保证如下设置
LANG=zh_CN.UTF-8
LC_ALL=”zh_CN.UTF-8”
配置测试
/usr/local/coreseek/bin/indexer -c /usr/local/coreseek/etc/sphinx-min.conf.dist
cd testpack
cat var/test/test.xml #窗口应该正确显示中文,如果出现乱码,请设置好字符集
/usr/local/mmseg/bin/mmseg -d /usr/local/mmseg/etc var/test/test.xml
/usr/local/coreseek/bin/indexer -c etc/csft.conf –all
如果出现文件不存在
使用命令 find / -name csft.conf 找到文件位置,并将 etc/csft.conf 替换成查询到的位置
如果出现Unigram dictionary load Error
编辑 csft.conf 文件,搜索 charset_dictpath ,修改为charset_dictpath = /usr/local/mmseg/etc/
/usr/local/coreseek/bin/search -c etc/csft.conf 自由缩放
出现如上图所示结果则表示成功
参考文档
Sphinx中文指南
http://www.sphinxsearch.org/sphinx-tutorial
Sphinx中文分词应用
http://www.sphinxsearch.org/archives/82
相关文章推荐
- centos6.5 安装tensorflow常见问题
- Centos下源码包安装lamp常见的几个小问题
- Centos 安装 JDK1.6 步骤及常见问题
- Linux常见问题处理—— Centos7下安装与卸载Jdk1.8
- CentOS下PHP7的编译安装及MySQL的支持和一些常见问题的解决办法
- CentOS环境Eclipse安装SVN插件几大常见问题
- CentOS6.5安装coreseek和sphinx php扩展
- centos SVN svnmanager 安装于配置及常见问题
- centos安装arm交叉工具链后常见的问题解决
- centOS安装非编译mysql常见问题
- [阿里云] Linux CentOS 7.4 环境下安装 MySql5.7 完整流程以及常见问题的解决方法
- 转---CentOS安装Oracle数据库详细介绍及常见问题汇总
- 【转】CentOS 7.0 安装Redis 3.2.1详细过程和使用常见问题
- Centos7 静默安装Oracle11g以及可视化安装常见问题
- centos6.5下docker的安装以及常见问题解决方法
- Centos7.0 安装Redis 3.2.1详细过程和使用常见问题
- CENTOS 7安装常见问题汇总
- CoreSeek(全文检索引擎 Sphinx 中文版)安装使用指南(CentOS6.5)
- Centos下源码包安装lamp常见的几个小问题