码迷,mamicode.com
首页 > 其他好文 > 详细

centos 安装sphinx

时间:2016-05-04 18:57:41      阅读:135      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!