日期:2014-05-16  浏览次数:20705 次

Linux下安装配置Sphinx
1.从http://sphinxsearch.com/ 下载相应的版本.这里测试的0.99稳定版:sphinx-2.0.1-beta.tar.gz

2.解压后安装
  ./configure --prefix=/usr/local/sphinx --with-mysql=/usr/local/mysql
  make && make install
完整文档可参考官方 http://sphinxsearch.com/docs/2.0.1/installing.html

3.启动searchd
执行/usr/local/sphinx/bin/seachd
如果报错:
/usr/local/sphinx/bin/indexer:error while loading shared libraries:libmysqlclient.so.18 cannot opent shared object file: No such file or directory
这主要是因为你安装库后,没有配置相应的环境变量.可以通过连接修正这个问题
ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib/libmysqlclient.so.18
对于64bit Linux,命令为:
ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64/libmysqlclient.so.18

然后再重试.