安装sphinx服务
yum -y install php-devel
cd /usr/local/src
tar -zxvf sphinx-1.3.1.tgz
cd /usr/local/src/sphinx-1.3.1
/usr/local/php/bin/phpize
cd /usr/local/src/coreseek-4.1-beta/testpack/api/libsphinxclient/
./configure
make && make install
运行完sphinx-1.3.1.tgz下才有configure文件
cd /usr/local/src/sphinx-1.3.1
./configure --with-php-config=/usr/local/php/bin/php-config --with-sphinx
make
make install
成功的标志:在/usr/local/php/lib/php/extensions/no-debug-non-zts-20121212
/sphinx.so
文件或出现20121212
配置php
vi /usr/local/php/lib/php.ini
php.ini文件中开启sphinx的扩展
[sphinx]
extension=sphinx.so
加入扩展后
重启php-fpm
pkill php-fpm
/usr/local/php/sbin/php-fpm