官方下載地址 http://sphinxsearch.com/downloads/release/
百度雲下載地址 https://pan.baidu.com/s/1gfmPbd5
wget tar -zxvf sphinx-2.1.1-beta.tar.gz cd sphinx-2.1.1-beta yum -y install make gcc gcc++ gcc-c++ libtool autoconf automake imake mysql-devel libxml2-devel expat-devel ./configure --prefix=/usr/local/sphinx
Updates, articles, help forum, and commercial support, consulting, training, and development services are available at http://sphinxsearch.com/ Thank you for choosing Sphinx!
make //生成編譯檔案 make install //編譯安裝
進入sphinx安裝後的目錄下的bin目錄執行命令建立索引
./indexer --all
./search document //預設測試
Sphinx 2.1.1-beta (rel21-r3701) Copyright (c) 2001-2013, Andrew Aksyonoff Copyright (c) 2008-2013, Sphinx Technologies Inc (http://sphinxsearch.com) using config file '/usr/local/sphinx/etc/sphinx.conf'... index 'test1': query 'document ': returned 2 matches of 2 total in 0.000 sec displaying matches: 1. document=1, weight=1557, group_id=1, date_added=Wed Feb 8 06:22:36 2017 id=1 group_id=1 group_id2=5 date_added=2017-02-08 06:22:36 title=test one content=this is my test document number one. also checking search within phrases. 2. document=2, weight=1557, group_id=1, date_added=Wed Feb 8 06:22:36 2017 id=2 group_id=1 group_id2=6 date_added=2017-02-08 06:22:36 title=test two content=this is my test document number two words: 1. 'document': 2 documents, 2 hits index 'test1stemmed': query 'document ': returned 2 matches of 2 total in 0.000 sec displaying matches: 1. document=1, weight=1557, group_id=1, date_added=Wed Feb 8 06:22:36 2017 id=1 group_id=1 group_id2=5 date_added=2017-02-08 06:22:36 title=test one content=this is my test document number one. also checking search within phrases. 2. document=2, weight=1557, group_id=1, date_added=Wed Feb 8 06:22:36 2017 id=2 group_id=1 group_id2=6 date_added=2017-02-08 06:22:36 title=test two content=this is my test document number two words: 1. 'document': 2 documents, 2 hits
要支援中文分詞,還需要下載Coreseek,sphinx標籤下文章有詳細說明