安装步骤

1.下载

wget http://www.xunsearch.com/download/xunsearch-full-latest.tar.bz2
tar -xjf xunsearch-full-latest.tar.bz2

2.进入,安装

 cd xunsearch-full-1.4.11/
sh setup.sh
+=================================================+
| Installation completed successfully, Thanks you |
| 安装成功,感谢选择和使用 xunsearch |
+-------------------------------------------------+
| 说明和注意事项: |
| 1. 开启/重新开启 xunsearch 服务程序,命令如下: |
| /home/jiqing/xunsearch/bin/xs-ctl.sh restart
| 强烈建议将此命令写入服务器开机脚本中 |
| |
| 2. 所有的索引数据将被保存在下面这个目录中: |
| /home/jiqing/xunsearch/data
| 如需要转移到其它目录,请使用软链接。 |
| |
| 3. 您现在就可以在我们提供的开发包(SDK)基础上 |
| 开发您自己的搜索了。 |
| 目前只支持 PHP 语言,参见下面文档: |
| /home/jiqing/xunsearch/sdk/php/README
+=================================================+

3.安装成功后,启动后台服务

sudo sh /home/jiqing/xunsearch/bin/xs-ctl.sh restart

$ sudo sh /home/jiqing/xunsearch/bin/xs-ctl.sh restart
INFO: stopping server[xs-indexd] (BIND:127.0.0.1:8383) .... [OK]
INFO: re-starting server[xs-indexd] ... (BIND:127.0.0.1:8383)
INFO: stopping server[xs-searchd] (BIND:127.0.0.1:8384) .... [OK]
INFO: re-starting server[xs-searchd] ... (BIND:127.0.0.1:8384)

可以查看服务启动情况

$ ps -ef |grep xs
root 14050 3097 0 09:59 00:00:00 xs-indexd: server
root 14055 3097 0 09:59 00:00:00 xs-searchd: master
root 14056 14055 0 09:59 00:00:00 xs-searchd: worker[1]
root 14057 14055 0 09:59 00:00:00 xs-searchd: worker[2]
root 14058 14055 0 09:59 00:00:00 xs-searchd: worker[3]
...
$ sudo netstat -anp | grep xs
tcp 0 0 127.0.0.1:8383 0.0.0.0:* LISTEN 14050/xs-indexd: se
tcp 0 0 127.0.0.1:8384 0.0.0.0:* LISTEN 14055/xs-searchd: m
...

可以将此命令添加到开机启动脚本中/etc/rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
sudo sh /home/jiqing/xunsearch/bin/xs-ctl.sh restart

4.安装PHP-SDK

只需要引入SDK即可。

require_once '$prefix/sdk/php/lib/XS.php';

检查环境情况

$php RequiredCheck.php
Xunsearch PHP-SDK 运行需求检查
============================== 检查内容
-------- 本程序用于确认您的服务器配置是否能满足运行 Xunsearch PHP-SDK 的要求。
它将检查服务器所运行的 PHP 版本,查看是否安装了合适的PHP扩展模块,以及
确认 php.ini 文件是否正确设置。 +------------+------------+--------------------------+--------------------------------+
| 项目 | 结果 | 用于 | 备注 |
+------------+------------+--------------------------+--------------------------------+
| PHP 版本 | 5.6.31 | XS(core) | PHP 5.2.0 或更高版本是必须的。 |
| SPL 扩展 | OK | XS(core) | SPL 扩展用于自动加载和对象戏法 |
| PCRE 扩展 | OK | XSDocument, XSSearch | 用于字符串切割、判断 |
| 编码转换 | mbstring | XSDocument, XSSearch | 用于支持非 UTF-8 字符集 |
| 缓存模块 | WARNING | XS | 用于缓存项目配置文件的解析结果 |
| JSON 扩展 | OK | util.Quest, util.Indexer | 用于读取或输出 JSON 格式的数据 |
| XML 扩展 | OK | util.Indexer | 用于读取导入 XML 格式的数据 |
| MySQL 扩展 | mysql | util.Indexer | 用于读取导入 MySQL 的数据库 |
| SQLite 扩 | sqlite3 | util.Indexer | 用于读取导入 SQLite 的数据库 |
+------------+------------+--------------------------+--------------------------------+ 检查结果
-------- 共计 8 项通过,1 项警告,0 项错误。 您的服务器配置符合 Xunsearch/PHP-SDK 的最低要求。
如果您需要使用特定的功能,请关注上述的 WARNING 项。

xunsearch安装使用的更多相关文章

  1. xunsearch安装配置

    1.wget http://www.xunsearch.com/download/xunsearch-full-latest.tar.bz2 2.tar -xjf xunsearch-full-lat ...

  2. xunsearch安装与卸载

    刚接触xunsearch(迅搜)的时候,我是排斥的.排斥的原因不是因为害怕学习新技术(其实我是对心技术很感兴趣),而是因为:一方面xunsearch是国人开发的,对于国人写的开源产品,我不是太感兴趣( ...

  3. 中文全文检索讯搜xunsearch安装

    Xunsearch (迅搜)是一套免费开源的专业中文全文检索解决方案,简单易用而且 功能强大.性能卓越能轻松处理海量数据的全文检索.它包含后端索引.搜索服务程序和前端 脚本语言编写的开发工具包(称之为 ...

  4. [linux] shell脚本编程-xunsearch安装脚本学习

    安装脚本setup.sh #!/bin/sh # FULL fast install/upgrade script # See help message via `--help' # $Id$ # s ...

  5. xunsearch安装及环境检测(一)

    1.运行执行下载解压安装包wget http://www.xunsearch.com/download/xunsearch-full-latest.tar.bz2解压到指定目录 tar -xjf xu ...

  6. xunsearch安装

    1.下载 sudo wget http://www.xunsearch.com/download/xunsearch-full-latest.tar.bz2 2.解压 sudo tar -xvjf x ...

  7. Xunsearch迅搜(基于 xapian+scws 的开源中文搜索引擎)安装与简单使用

    今天鼓捣了xunsearch,感觉官方指南写得挺详细,于是按照指南一步一步走,但是感觉越看越凌乱,像看API一样,新手看得特费劲,网上也少有新手教程,于是略过今天的歪路,记录一下我的安装步骤. Xun ...

  8. 搜索服务器xunsearch实现

    安装方法:   centos 6.6 64位   histroy:   12  cd /srv/   13  wget http://www.xunsearch.com/download/xunsea ...

  9. 实践中 XunSearch(讯搜)的使用教程步骤

    XunSearch(讯搜)的使用教程步骤 一.安装编译工具 yum install make gcc g++ gcc-c++ libtool autoconf automake imake mysql ...

随机推荐

  1. Nginx的长链接

    网站使用程序discuz3访问都正常,只有用户登录存在异常,具体就是:用户登陆后会马上显示未登录,然后刷新一下又变成了登录中 这个问题的原因显然是由于session导致,后台有多个web机器,当用户登 ...

  2. 记升级mysql后的一次故障

    一.问题背景 接上级要求,某生产数据库需要实施备份:刚好漏洞扫描报告出来,mysql 版本需要升级到5.7.20,于是就未雨绸缪,先写脚本.脚本在mysql旧版本下完全可用(未升级前,mysql 为5 ...

  3. MongoDB架构——记得结合前面的文章看,里面的图画的很好

    转自:http://www.ha97.com/4580.html 本文图片来自Ricky Ho的博文MongoDB构架(MongoDB Architecture),这是个一听就感觉很宽泛的话题,但是作 ...

  4. MSSQL旋转和反旋转的例子

    1.旋转 ;WITH CTE AS ( AS VAL UNION ALL UNION ALL UNION ALL UNION ALL UNION ALL UNION ALL UNION ALL ) S ...

  5. UI- 基础控件零散知识点回归

    1.frame\center\bounds 1> frame:能修改位置和尺寸 2> center:能修改位置 3> bounds:能修改尺寸(x\y一般都是0) 2.在.m中声明的 ...

  6. dubbo常见报错

    1. java.io.IOException: Can not lock the registry cache file C:\Users\Administrator\.dubbo\dubbo-reg ...

  7. 理解RESTful风格(转)

    原文链接:http://www.ruanyifeng.com/blog/2011/09/restful.html 越来越多的人开始意识到,网站即软件,而且是一种新型的软件. 这种"互联网软件 ...

  8. 【CSAPP】一、计算机系统漫游

    一.位+上下文 文本文件 / 二进制文件: 文本文件是只由ASCII码构成的文件 二.从源代码到可执行文件的顺序 源代码 ——> 可执行文件(机器代码)共有四步: 全过程代码 gcc hello ...

  9. ASP.NET学习路线图(转)

    如果你已经有较多的面向对象开发经验,跳过以下这两步: 第一步 掌握一门.NET面向对象语言,C#或VB.NET 我强烈反对在没系统学过一门面向对象(OO)语言的前提下去学ASP.NET. ASP.NE ...

  10. C#中upd分包与发送,已经实现全部代码

    using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Tool ...