博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

php 安装shpinx扩展

Posted on 2016-05-06 10:16  红与黑hyh  阅读(179)  评论(0编辑  收藏  举报

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