官網下載 :http://sphinxsearch.com/downloads/sphinx-2.2.10-release.tar.gz/thankyou.htmlphp
安裝sphinxhtml
解壓mysql
tar zxvf sphinx-2.1.4-release.tar.gz cd sphinx-2.1.4-release ./configure --prefix=/usr/local/sphinx --with-mysql-includes=/usr/local/mysql/include/mysql/ --with-mysql-libs=/usr/local/mysql/lib/mysql --with-iconv #mysql 的目錄經過locate查詢 make && make install
libsphinxclient 安裝(PHP模塊須要)sql
cd api/libsphinxclient ./configure –prefix=/usr/local/sphinx make && make install
安裝PHP的Sphinx模塊數據庫
wget http://pecl.php.net/get/sphinx-1.3.0.tgz tar zxf sphinx-1.3.0.tgz cd sphinx-1.3.0 /usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/php/bin/php-config --with-sphinx=/usr/local/sphinx/ make && make install
安裝好後,在安裝目錄下etc目錄下,有份測試數據和配置的樣本(沒發現有,etc文件)api
cd /usr/local/sphinx/etc
cp sphinx.conf.dist sphinx.conf
將sphinx.conf裏面的數據庫地址,帳號密碼改下就行了,再將lvtao.sql導進數據庫lvtao
測試執行測試
/usr/local/sphinx/bin/search lvtao
就能夠看到一些查詢的相關信息了spa