官网下载 :http://sphinxsearch.com/downloads/sphinx-2.2.10-release.tar.gz/thankyou.html
安装sphinx
解压
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模块需要)
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文件)
cd /usr/local/sphinx/etc
cp sphinx.conf.dist sphinx.conf
将sphinx.conf里面的数据库地址,账号密码改下就好了,再将lvtao.sql导进数据库lvtao
测试执行
/usr/local/sphinx/bin/search lvtao
就可以看到一些查询的相关信息了