安装php扩展sphinx

时间:2022-02-26 08:29:20

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


本文出自 “技术成就梦想” 博客,请务必保留此出处http://hxl2009.blog.51cto.com/779549/1224813