测试平台:Center OS

1、设置环境,升级/安装系统基础依赖包:m4、autoconf、automake、libtool

    #设置路径和中文环境:
$ export PATH=/usr/local/bin:$PATH
$ export LC_ALL=zh_CN.UTF-8
$ export LANG=zh_CN.UTF-8
   #下载安装基础依赖包
$ curl -O -L http://mirrors.kernel.org/gnu/m4/m4-1.4.13.tar.gz
$ tar -xzvf m4-1.4.13.tar.gz
$ cd m4-1.4.13
$ ./configure --prefix=/usr/local
$ make && make install
$ cd .. $ curl -O -L http://mirrors.kernel.org/gnu/autoconf/autoconf-2.65.tar.gz
$ tar -xzvf autoconf-2.65.tar.gz
$ cd autoconf-2.65
$ ./configure --prefix=/usr/local
$ make && make install
$ cd .. $ curl -O -L http://mirrors.kernel.org/gnu/automake/automake-1.11.tar.gz
$ tar xzvf automake-1.11.tar.gz
$ cd automake-1.11
$ ./configure --prefix=/usr/local
$ make && make install
$ cd .. $ curl -O -L http://mirrors.kernel.org/gnu/libtool/libtool-2.2.6b.tar.gz
$ tar xzvf libtool-2.2.6b.tar.gz
$ cd libtool-2.2.6b
$ ./configure --prefix=/usr/local
$ make && make install
$ cd ..

2、下载安装coreseek

   #下载coreseek:
$ curl -O -L http://www.coreseek.cn/uploads/csft/3.2/coreseek-3.2.14.tar.gz
$ tar xzvf coreseek-3.2.14.tar.gz
$ cd coreseek-3.2.14 #安装mmseg
$ cd mmseg-3.2.14
$ ./bootstrap
$ ./configure --prefix=/usr/local/mmseg3
$ make && make install
$ cd ..
    遇到的问题:
      error: cannot find input file: src/Makefile.in
      或者遇到其他类似error错误时...
    解决方案:
      依次执行下面的命令,我运行'aclocal'时又出现了错误,解决方案请看下文描述
      yum -y install libtool
      aclocal
      libtoolize --force
      automake --add-missing
      autoconf
      autoheader
      make clean
     
      #安装coreseek
      $ cd csft-3.2.14
      $ 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
     
      #如果提示mysql问题,可以查看MySQL数据源安装说明   http://www.coreseek.cn/product_install/install_on_bsd_linux/#mysql
      $ make && make install
        如果编译出错:
            1、‘this->ExprEval’ instead.....
             编辑sphinxexpr.cpp
            将所有的:T val = ExprEval ( this->m_pArg, tMatch );
             替换为:T val = this->ExprEval ( this->m_pArg, tMatch );
             保存并重新编译
      $ 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 网络搜索
      遇到问题:
        出现这个 xmlpipe2 support NOT compiled in. To use xmlpipe2, install missing XML libra  错误。
      解决方案:
        yum -y install expat expat-devel
     
      依次安装后,从新编译coreseek,然后再生成索引,就可以通过了。
      结果如下:
        Coreseek Fulltext 4.1 [ Sphinx 2.0.2-dev (r2922)]
        Copyright (c) 2007-2011,
        Beijing Choice Software Technologies Inc (http://www.coreseek.com)
        using config file 'etc/csft.conf'...
        index 'xml': query '网络搜索 ': returned 1 matches of 1 total in 0.000 sec
        displaying matches:
        1. document=1, weight=1590, published=Thu Apr 1 07:20:07 2010, author_id=1
        words:
          1. '网络': 1 documents, 1 hits
          2. '搜索': 2 documents, 5 hits

  

Linux下搭建coreseek(sphinx+mmseg3)全文检索的更多相关文章

  1. 搭建coreseek(sphinx+mmseg3)详细安装配置+php之sphinx扩展安装+php调用示例(转)

    一个文档包含了安装.增量备份.扩展.api调用示例,省去了查找大量文章的时间. 搭建coreseek(sphinx+mmseg3)安装 [第一步] 先安装mmseg3 cd /var/install ...

  2. windows/Linux 下安装coreseek/sphinx

    2013年12月8日 17:26:26 注意的地方: 1.配置文件的 数据源, 索引, 服务 这3处配置的路径要写成windows识别的路径,最好是绝对路径 2.安装windows服务的时候,可以不带 ...

  3. 搭建coreseek(sphinx+mmseg3)详细安装配置+php之sphinx扩展安装+php调用示例

    http://blog.csdn.net/e421083458/article/details/21529969 常用的命令 ps -ef|grep searchd 如果你开了search服务后,你命 ...

  4. MongoDB学习笔记—Linux下搭建MongoDB环境

    1.MongoDB简单说明 a MongoDB是由C++语言编写的一个基于分布式文件存储的开源数据库系统,它的目的在于为WEB应用提供可扩展的高性能数据存储解决方案. b MongoDB是一个介于关系 ...

  5. Linux下搭建个人网站

    前不久在阿里买了一个服务器,然后开始第一次尝试搭建自己的个人网站.前端采用了bootstrap框架,后端采用的是PHP,数据库使用的是Mysql.新手第一次在linux下搭建遇见很多问题,在这里分享一 ...

  6. Linux下搭建PHP环境

    转载于: http://www.uxtribe.com/php/405.html 该站下有系列PHP文章. 在Linux下搭建PHP环境比Windows下要复杂得多.除了安装Apache,PHP等软件 ...

  7. Java学习心得之 Linux下搭建Java环境

    作者:枫雪庭 出处:http://www.cnblogs.com/FengXueTing-px/ 欢迎转载 Java学习心得之 Linux下搭建Java环境 1.前言2.JDK安装3.配置环境变量4. ...

  8. Java学习心得之 Linux下搭建JavaWeb环境

    作者:枫雪庭 出处:http://www.cnblogs.com/FengXueTing-px/ 欢迎转载 Java学习心得之 Linux下搭建JavaWeb环境 1. 前言2. Java安装3. t ...

  9. Ruby学习心得之 Linux下搭建Ruby环境

    作者:枫雪庭 出处:http://www.cnblogs.com/FengXueTing-px/ 欢迎转载 Ruby学习心得之 Linux下搭建Ruby环境1.前言2.Linux下安装Ruby环境 一 ...

随机推荐

  1. 异步控制---实现函数asyncAll,在执行完传入数组中func1,func2,func3异步函数后,输出“end”

    实现函数asyncAll,在执行完传入数组中func1,func2,func3异步函数后,输出"end" function func1(callback) { setTimeout ...

  2. Qt - 读取GPS数据

    1.GPS型号为ublox(EVK-M8L),配有USB接口,Qt版本5.7 2.实现步骤: (1)实现串口通信 采用Qt5.7 内置的串口操作类QSerialPort和QSerialPortInfo ...

  3. React state的使用

    相对于angular.js的双向数据绑定,React 可以使用State来实现. React 里,只需更新组件的 state,然后根据新的 state 重新渲染用户界面(不要操作 DOM). this ...

  4. C#在二维码中添加圆角logo

    public class QRCodeHelper { #region 合并用户QR图片和用户头像 /// <summary> /// 合并用户QR图片和用户头像 /// </sum ...

  5. linux配置网卡IP地址命令详细介绍及一些常用网络配置命令

    linux配置网卡IP地址命令详细介绍及一些常用网络配置命令2010-- 个评论 收藏 我要投稿 Linux命令行下配置IP地址不像图形界面下那么方 便,完全需要我们手动配置,下面就给大家介绍几种配置 ...

  6. java 保留字符串数字的位数,不够前面补0

    @Test public void test() { this.printToConsole(autoGenericCode("10011")); this.printToCons ...

  7. 在linux下使用curl访问 多参数url GET参数问题

    一.在Crontab中使用PHP执行脚本 就像在Crontab中调用普通的shell脚本一样(具体Crontab用法),使用PHP程序来调用PHP脚本.每一小时执行myscript.php如下: # ...

  8. 不一样的dynamic解析json 万能方法

    写过javascript的人都知道js解析json 1:(JSON) 字符串转换为对象. var str = '{"name":"lsw","hobb ...

  9. appium 滑动

    前些日子,配置好了appium测试环境,至于环境怎么搭建,参考:http://www.cnblogs.com/tobecrazy/p/4562199.html   知乎Android客户端登陆:htt ...

  10. VMWARE修改CPUID

    在cmd shell下执行wmic cpu get ProcessorId命令,可是查看机器的cpuID,但这个命令显示的只是2组ID,实际CPUID,有4组 通过更改虚拟机配置文件.vmx可是实现任 ...