一、安装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路径一定要正确
时间: 2024-10-25 15:36:21