18

04-2014

一、安装libzookeeper
cd /usr/local/src/
wget http://mirror.bit.edu.cn/apache//zookeeper/zookeeper-3.4.5/zookeeper-3.4.5.tar.gz
tar -xf zookeeper-3.4.5.tar.gz
cd zookeeper-3.4.5/src/c
./configure –prefix=/usr/local/zookeeper/zookeeper-3.4.5/
make && make install
二、安装php zookeeper扩展
cd /usr/local/src/
wget ‘http://pecl.php.net/get/zookeeper-0.2.2.tgz’
tar zxvf zookeeper-0.2.2.tgz
cd zookeeper-0.2.2
phpize
./configure –with-php-config=/usr/local/php/bin/php-config  –with-libzookeeper-dir=/usr/local/zookeeper/zookeeper-3.4.5/
make && make install
vim /usr/local/php/etc/php.ini
查找:extension_dir=”/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/”
添加:extension=zookeeper.so
三注意:php-config libzookeeper-di路径一定要正确
phpize是php为方便编译扩展用的命令,没有的需要安装

程序本天成,妙手偶得之!我们只是代码的搬运工!

转载请注明:http://www.521php.com/archives/1681/

发表评论

昵称:

网址:

eg.博客主题调用的是Gravatar头像,你可以通过邮箱注册获得头像.
/ 快捷键:Ctrl+Enter