cd /home/packages
wget http://sphinxsearch.com/files/sphinx-0.9.9.tar.gz
tar xzvf sphinx-0.9.9.tar.gz
cd sphinx-0.9.9/api/libsphinxclient
vim sphinxclient.c
找到
void sock_close ( int sock );
改为
static void sock_close ( int sock );
./configure --prefix=/usr/local/sphinxclient
make
make install
安装sphinx扩展
cd /home/packages
wget http://pecl.php.net/get/sphinx-1.0.3.tgz
tar xvzf sphinx-1.0.3.tgz
cd sphinx-1.0.3
/usr/local/php5_nginx/bin/phpize
./configure --with-php-config=/usr/local/php5_nginx/bin/php-config --with-sphinx=/usr/local/sphinxclient
make
make install
修改php.ini (PATH 根据实际情况)
extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/"
[sphinx]
extension=sphinx.so
时间: 2024-10-13 03:36:09