测试平台: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. javadoc生成出现错误“编码 GBK 的不可映射字符”

    https://my.oschina.net/tiancai/blog/155299 http://heweina2007.iteye.com/blog/1561387 http://blog.csd ...

  2. 服务端调用dubbo的方式

    方式1.通过dubbo 方式2.通过spring applicationContext-dubbo.xml 注意引入提供方的接口jar包

  3. Centos7下面配置静态IP

    修改网卡配置文件(操作前先备份一下该文件),/etc/sysconfig/network-scripts/ifcfg-enp0s3 ,如下: TYPE=Ethernet BOOTPROTO=stati ...

  4. kvm虚拟机静态和动态迁移

    一.kvm虚拟机静态迁移 1.静态迁移就是虚拟机在关机状态下,拷贝虚拟机虚拟磁盘文件与配置文件到目标虚拟主机中,实现的迁移. (1)虚拟主机各自使用本地存储存放虚拟机磁盘文件 本文实现基于本地磁盘存储 ...

  5. Java 知识结构图

    不可不懂的.NET基础知识 - 谷海燕 - 博客频道 - CSDN.NEThttp://blog.csdn.net/zhuanzhe117/article/details/8954924 出处:深入理 ...

  6. vue2.0 组件之间的数据传递

    组件间的数据传递// 父组件<template><div class="order"><dialog-addpro v-on:closedialog= ...

  7. "_OBJC_CLASS_$_CMMotionManager", referenced from:

    好久没写随笔了,今日项目爆红.如下: 缺少系统库 CoreMotion.framework, 在Build Phases -> Link Binary With Libraries 中添加即可.

  8. iOS开发UI篇—CAlayer(自定义layer)

    iOS开发UI篇—CAlayer(自定义layer) 一.第一种方式 1.简单说明 以前想要在view中画东西,需要自定义view,创建一个类与之关联,让这个类继承自UIView,然后重写它的Draw ...

  9. 解决java.lang.NoClassDefFoundError: org/objectweb/asm/util/TraceClassVisitor

    方案一: <dependency> <groupId>asm</groupId> <artifactId>asm-all</artifactId& ...

  10. facebook 简单的图文分享

    参考网址:http://www.mrfangge.com/facebook-page-share-settings/ 首先在facebook 注册开发者,新增一个应用,这里就要一个生所的应用 app_ ...