首页 > 其他 > 详细

centos 安装sphinx

时间:2016-05-04 18:56:01      阅读:181      评论:0      收藏:0      [点我收藏+]

官网下载 :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
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

就可以看到一些查询的相关信息了

centos 安装sphinx

原文:http://www.cnblogs.com/hyh123/p/5459268.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!