1、先安装sphinxclient
   #cd /usr/local/src
   #wget http://sphinxsearch.com/files/sphinx-0.9.9.tar.gz
   #tar xzvf sphinx-0.9.9.tar.gz
   #cd sphinx-0.9.9/api/libsphinxclient
   #vim sphinxclient.c                    
    找到
    void sock_close ( int sock );
    改为
    static void sock_close ( int sock );
   #./configure --prefix=/usr/local/sphinxclient
   #make
   #make install
 2、安装sphinx扩展
   #wget http://pecl.php.net/get/sphinx-1.0.4.tgz
   #tar xvzf sphinx-1.0.4.tgz
   #cd sphinx-1.0.4
   #/usr/local/php/bin/phpize
   #./configure --with-php-config=/usr/local/php/bin/php-config --with-sphinx=/usr/local/sphinxclient
   #make
   #make install
   修改php.ini
   extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/"
   [sphinx]
   extension=sphinx.so
3.安装sphinx服务软件
yum install sphinx
启动sphinx服务
/usr/bin/searchd
修改sphinx.conf配置文件
添加这个配置项sql_sock  =  /tmp/mysql.sock 建立索引
/usr/bin/indexer --all --rotate
测试搜索结果
/usr/bin/search test

配置sphinx的更多相关文章

  1. linux配置sphinx

    1. 配置索引 cd /usr/local/sphinx/etc/ cp sphinx.conf.dist sphinx.conf //备份配置文件,防止改错 vim sphinx.conf 配置文件 ...

  2. sphinx 配置sphinx.conf

    sphinx的配置文件是在配置的时候最容易出错的了: 基本概念: source:数据源,数据是从什么地方来的. index:索引,当有数据源之后,从数据源处构建索引.索引实际上就是相当于一个字典检索. ...

  3. Windows下配置sphinx+reStructuredText详解

    最近有朋友想在windows下做个人笔记,没有找到顺手的工具,问我有什么好的工具推荐.正好前两天在网上看到一款做文档的利器sphinx+reStructText,当时在ubuntu下搭了下环境试了试, ...

  4. phpcms v9 配置sphinx全文索引教程

    英文介绍:http://www.sphinxsearch.com/docs/manual-0.9.9.html 一.首先需要在服务器上安装sphinx 在Windows上安装sphinx     1. ...

  5. linux 配置 sphinx 全文搜索引擎

    因为公司网站需要,最近在弄sphinx搜索引擎,也是遇到各种问题,最终终于解决了. 服务器系统:centos7 (64位) 详情看安装官网的安装教程进行 coreseek 3.2.14 这里只提一些注 ...

  6. CentOS6.5 安装Sphinx 配置MySQL数据源

      前提安装完mysql,并创建测试表和数据 DROP TABLE IF EXISTS `documents`; CREATE TABLE IF NOT EXISTS `documents` ( `i ...

  7. Sphinx中文分词安装配置及API调用

    这几天项目中需要重新做一个关于商品的全文搜索功能,于是想到了用Sphinx,因为需要中文分词,所以选择了Sphinx for chinese,当然你也可以选择coreseek,建议这两个中选择一个,暂 ...

  8. CentOS6.4 安装Sphinx 配置MySQL数据源

    前提安装完mysql,并创建测试表和数据 DROP TABLE IF EXISTS `documents`; CREATE TABLE IF NOT EXISTS `documents` ( `id` ...

  9. Sphinx中文分词详细安装配置及API调用实战

    这几天项目中需要重新做一个关于商品的全文搜索功能,于是想到了用Sphinx,因为需要中文分词,所以选择了Sphinx for chinese,当然你也可以选择coreseek,建议这两个中选择一个,暂 ...

随机推荐

  1. NAS4Free 安装配置(五)配置SMB

    配置SMB 现在我们有2块存储设备,一块做下载盘,一块做数据盘 为了便于管理和扩展,我们分别在两块盘上建文件夹和Dataset 对于download盘,因为是UFS,所以只能建文件夹 我们把整个盘共享 ...

  2. HDU 5417 Victor and Machine

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5417 Problem Description Victor has a machine. When t ...

  3. Json.Net从4.0升级到7.0带来的问题

    1.由于被迫Json.Net升级,导致了我们一部分查询出来数据 2.分析原因result = JsonConvert.DeserializeObject(inputContent, JsonDataT ...

  4. c# post方式发送请求

    public static bool CheckNew(string serverIP) { bool passed = false; try { string url = string.Format ...

  5. [POJ] 3264 Balanced Lineup [ST算法]

    Balanced Lineup Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 34306   Accepted: 16137 ...

  6. Effective Java2读书笔记-对于所有对象都通用的方法(二)

    第10条:始终要覆盖toString 这一条没什么好讲的,就是说默认的toString方法打印出来的是类名+@+十六进制哈希码的值.我们应该覆盖它,使它能够展示出一些更为详细清晰的信息,这个看实际情况 ...

  7. Codeforces 494D Upgrading Array

    http://codeforces.com/contest/494/problem/D 题意:给一个数组,和一个坏质数集合,可以无数次地让1到i这些所有数字除以他们的gcd,然后要求Σf(a[i])的 ...

  8. Hdu3812-Sea Sky(深搜+剪枝)

    Sea and Sky are the most favorite things of iSea, even when he was a small child.  Suzi once wrote: ...

  9. Android核心基础(十)

    1.音频采集 你可以使用手机进行现场录音,实现步骤如下: 第一步:在功能清单文件AndroidManifest.xml中添加音频刻录权限: <uses-permission android:na ...

  10. 最简单的XML转数组

    /** * 最简单的XML转数组 * @param string $xmlstring XML字符串 * @return array XML数组 */ function simplest_xml_to ...