一、首先到Sphinx官网找到下载地址:http://sphinxsearch.com/downloads/release/
如果你比较懒,好吧:http://sphinxsearch.com/files/sphinx-2.2.11-1.rhel7.src.rpm
二、安装
1
|
rpm -ivh sphinx-2.2.11-1.rhel7.src.rpm
|
接下来可能会出现两个错误
错误:依赖检测失败:
libodbc.so.2()(64bit) 被 sphinx-2.2.11-1.rhel7.x86_64 需要
libpq.so.5()(64bit) 被 sphinx-2.2.11-1.rhel7.x86_64 需要
解决依赖:
1
|
yum -y install unixODBC postgresql-libs
|
再次安装
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
|
rpm -ivh sphinx-2.2.11-1.rhel7.src.rpm
准备中... ################################# [100%]
正在升级/安装...
1:sphinx-2.2.11-1.rhel7 ################################# [100%]
Sphinx installed!
Now create a full-text index, start the search daemon, and you're all set.
To manage indexes:
editor /etc/sphinx/sphinx.conf
To rebuild all disk indexes:
sudo -u sphinx indexer --all --rotate
To start/stop search daemon:
systemctl start/stop searchd
To query search daemon using MySQL client:
mysql -h 0 -P 9306
mysql> SELECT * FROM test1 WHERE MATCH('test');
See the manual at /usr/share/doc/sphinx-2.2.11 for details.
For commercial support please contact Sphinx Technologies Inc at
http://sphinxsearch.com/contacts.html
|
Success!