mysql社工库搭建教程,分享我的社工库的裤子+sphinx社工库搭建教程

分享我的社工库的裤子+sphinx社工库搭建教程

搭建教程:

先导入md5.phpinfo.me.sql

下载sphinx  http://sphinxsearch.com/  我用的是windows版的  当然linux也差不多

创建配置文件sphinx-zh/bin/sphinx.conf

#

# Minimal Sphinx configuration sample (clean, simple, functional)

#

source src1

{

type = mysql

sql_host = localhost

sql_user = root

sql_pass = 1141056911

sql_db = md5

sql_port = 3306

sql_query = SELECT `id`,`username`,`password`,`email`,`salt`,`order` FROM md5_sgk

sql_query_info = SELECT * FROM md5_sgk WHERE id=$id

}

index test1

{

source = src1

path = D:/sphinx-zh/data/

docinfo = extern

charset_type = utf-8

chinese_dictionary = D:/sphinx-zh/etc/xdict

}

indexer

{

mem_limit = 256M

}

searchd

{

listen = 9312

listen = 9306:mysql41

log = D:/sphinx-zh/log/searchd.log

query_log = D:/sphinx-zh/log/query.log

read_timeout = 5

max_children = 30

pid_file = D:/sphinx-zh/searchd.pid

max_matches = 1000

seamless_rotate = 1

preopen_indexes = 1

unlink_old = 1

workers = threads # for RT to work

binlog_path = D:/sphinx-zh/1

}

然后执行命令创建索引 C:\Documents and Settings\Administrator>cd D:\sphinx-zh\bin

C:\Documents and Settings\Administrator>cd /d D:\sphinx-zh\bin

D:\sphinx-zh\bin>indexer --all

sphinx-for-chinese 2.1.0-dev (r3361)

Copyright (c) 2008-2012, sphinx-search.com

using config file './sphinx.conf'...

indexing index 'test1'...

WARNING: Attribute count is 0: switching to none docinfo

^Cllected 9000 docs, 0.4 MB

现在就开始创建索引了请耐心等待 创建完成以后执行 searchd.exe启动搜索服务

然后就可以用如下源码查询了 sgk源码:

sgk

源码还需要自行改改

接下来就尽情享受毫秒级搜索的速度吧

http://www.dengb.com/aqgjrj/961458.htmlwww.dengb.comtruehttp://www.dengb.com/aqgjrj/961458.htmlTechArticle分享我的社工库的裤子+sphinx社工库搭建教程 搭建教程: 先导入md5.phpinfo.me.sql 下载sphinx http://sphinxsearch.com/ 我用的是windows版的 当然linux也差...

  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值