coreseek服务的安装配置

简介:

安装sphinx相关服务。

参考:http://blog.csdn.net/e421083458/article/details/21529969

http://www.coreseek.cn/products-install/install_on_bsd_linux/

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
安装sphinx相关服务。
参考:http: //blog .csdn.net /e421083458/article/details/21529969
http: //www .coreseek.cn /products-install/install_on_bsd_linux/
 
一、客户端安装
 
1. pecl安装
# pecl install sphinx
 
 
2. 编译安装
1)安装sphinx库
安装libsphinxclient
# wget http://www.coreseek.cn/uploads/csft/4.0/coreseek-4.1-beta.tar.gz
# tar zxvf coreseek-4.1-beta.tar.gz && cd coreseek-4.1-beta
# cd csft-4.1/api/libsphinxclient/
 
# aclocal
# libtoolize --force
# automake --add-missing
# autoconf
# autoheader
 
#./configure  --prefix=/usr/local/sphinxclient
# make && make install
# cd /home/download/
 
2)安装php扩展
# wget http://pecl.php.net/get/sphinx-1.3.2.tgz
# tar zxvf sphinx-1.3.2.tgz && cd sphinx-1.3.2
# phpize
# ./configure --with-sphinx=/usr/local/sphinxclient
# make && make install
Installing shared extensions:      /usr/lib64/php/modules/
 
修改php配置,增加扩展到:
# cat /etc/php.d/sphinx.ini 
; Enable sphinx extension module
extension=sphinx.so
 
# php -m |grep sphinx
sphinx
 
重启php-fpm服务:
# service php-fpm reload
Reloading php-fpm: [12-Nov-2014 09:15:32] NOTICE: configuration  file  /etc/php-fpm .conf  test  is successful
 
 
 
二、安装sphinx软件coreseek服务端
[root@test1 download] # yum install libtool expat expat-devel
[root@test1 download] # wget http://www.coreseek.cn/uploads/csft/4.0/coreseek-4.1-beta.tar.gz
[root@test1 download] # tar zxvf coreseek-4.1-beta.tar.gz && cd coreseek-4.1-beta
 
1)安装mmesg3
[root@test1 coreseek-4.1-beta] # cd mmseg-3.2.14/
[root@test1 mmseg-3.2.14] # ./bootstrap
 
[root@test1 mmseg-3.2.14] # aclocal
[root@test1 mmseg-3.2.14] # libtoolize --force
[root@test1 mmseg-3.2.14] # automake --add-missing
[root@test1 mmseg-3.2.14] # autoconf  
[root@test1 mmseg-3.2.14] # autoheader  
 
[root@test1 mmseg-3.2.14] # ./configure --prefix=/usr/local/mmseg3
[root@test1 mmseg-3.2.14] # make && make install
 
2)安装coreseek
[root@test1 mmseg-3.2.14] # cd ../csft-4.1/
[root@test1 csft-4.1] # sh buildconf.sh 
[root@test1 csft-4.1] # ./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
[root@test1 csft-4.1] # make && make install
 
测试:
[root@test1 csft-4.1] # cd ../testpack
[root@test1 csft-4.1] # cat var/test/test.xml    #此时应该正确显示中文
生成:
[root@test1 csft-4.1] # /usr/local/mmseg3/bin/mmseg -d /usr/local/mmseg3/etc var/test/test.xml
[root@test1 testpack] # /usr/local/coreseek/bin/indexer -c etc/csft.conf --all
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' ...
indexing index  'xml' ...
collected 3 docs, 0.0 MB
sorted 0.0 Mhits, 100.0%  done
total 3 docs, 7585 bytes
total 0.011 sec, 665350 bytes /sec , 263.15 docs /sec
total 3 reads, 0.000 sec, 2.8 kb /call  avg, 0.0 msec /call  avg
total 9 writes, 0.000 sec, 2.2 kb /call  avg, 0.0 msec /call  avg
 
搜索:
[root@test1 testpack] # /usr/local/coreseek/bin/search -c etc/csft.conf 网络搜索
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 22:20:07 2010, author_id=1
 
words:
1.  '网络' : 1 documents, 1 hits
2.  '搜索' : 2 documents, 5 hits



本文转自 pcnk 51CTO博客,原文链接:xxxxhttp://blog.51cto.com/nosmoking/1595266 xxx,如需转载请自行联系原作者
相关文章
|
关系型数据库 MySQL 应用服务中间件
LAMP & LNMP及简单环境搭建
LAMP & LNMP及简单环境搭建
150 0
|
自然语言处理 关系型数据库 Java
sphinx(二)centos7编译安装coreseek3.2
sphinx是不支持中文分词的,所以,百度上给的大多数的结果是基于sphinx内核开发的coreseek+mmseg分词的一套组合来实现中文分词+全文检索。
224 0
sphinx(二)centos7编译安装coreseek3.2
|
应用服务中间件 PHP nginx
|
Apache 数据安全/隐私保护
|
监控 测试技术 Linux
|
关系型数据库 应用服务中间件 PHP