linux安装SPHINX

wget http://www.sphinxsearch.com/downloads/sphinx-0.9.8-rc2.tar.gz
tar -xvzf sphinx-0.9.8-rc2.tar.gz
cd sphinx-0.9.8-rc2
./configure --prefix=/usr/local/sphinx --with-mysql=/usr/local/mysql
make
make install
cp sphinx.conf.dist sphinx.conf
vi sphinx.conf
修改配置文件中的用户名和访问密码
mysql -uroot -p < /usr/local/sphinx/etc/example.sql

vi /etc/ld.so.conf.d/mysqlclient15.conf
增加一行记录 /usr/local/mysql/lib
ldconfig
/usr/local/sphinx/bin/indexer --config=/usr/local/sphinx/etc/sphinx.conf --all

正常情况下,可以看到索引完成。
/usr/local/sphinx/bin/search test
可以看到查询结果

你可能感兴趣的:(sql,linux,mysql)