原文地址:http://blog.csdn.net/adparking/article/details/7207119
1.下载PHP客户端安装:
http://pecl.php.net/package/sphinx
vim sphinxclient.c
找到
void sock_close ( int sock );
改为
static void sock_close ( int sock );
找到
void sock_close ( int sock );
改为
static void sock_close ( int sock );
在php.ini加扩展,客户端安装完毕 2.安装sphinx,前提你已经安装mysql且安装了mysql-devel重源码安装mysql的
mysql-devel都已经安装,yum安装的运行
yum -y install mysql-devel
下载sphinx2.0.1地址:
http://sphinxsearch.com/downloads/
tar -xvzf sphinx-2.0.1-beta.tar.gz
cd sphinx-2.0.1-beta
./configure –prefix=/usr/local/sphinx –with-mysql –with-iconv
cd sphinx-2.0.1-beta
./configure –prefix=/usr/local/sphinx –with-mysql –with-iconv
备注:64位增加参数 –enable-id64
make && make install cd /usr/local/sphinx/etc/ cp sphinx.conf.dist sphinx.conf
Read: 4211