Net::zookeeper 安装

1、由于perl的zookeeper扩展包Net::zookeeper需要使用ZK本身的C client,因此需要在机器上去安装Zookeeper C client。

Zookeeper C client 的实现在 src/c 目录下,进入到该目录安装 Zookeeper C client,步骤如下:
$ ./configure
$ make
$ sudo make install //需要root权限,否则不能安装成功
2、安装Net::zookeeper
在编译的过程中一定要指明 -- zookeeper - include、 -- zookeeper - lib。
perl Makefile.PL --zookeeper-include=/data/home/tdsql/zookeeper-3.4.6/src/c/include --zookeeper-lib=/usr/local/bin
make
make test //测试模块是否成功
make install //安装
测试前需要
export LD_LIBRARY_PATH=/usr/local/lib
之后执行  
make test

 若测试成功则输出

[root@TENCENT64 /data/home/summer/onlineddl/Net-ZooKeeper-0.41]# make test
PERL_DL_NONLAZY=1/usr/bin/perl "-MExtUtils::Command::MM""-e""test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/10_invalid.t ....1/107# no ZooKeeper hostnames specified in ZK_TEST_HOSTS env var, using localhost:2181
# no ZooKeeper path specified in ZK_TEST_PATH env var, using root path
t/10_invalid.t .... ok
t/15_thread.t ..... ok
t/20_tie.t ........ ok
t/22_stat_tie.t ... ok
t/24_watch_tie.t .. ok
t/30_connect.t .... ok
t/35_log.t ........ ok
t/40_basic.t ...... ok
t/45_class.t ...... ok
t/50_access.t ..... ok
t/60_watch.t ...... ok
All tests successful.
Files=11,Tests=463,17 wallclock secs (0.06 usr 0.00 sys +0.14 cusr 0.02 csys =0.22 CPU)
Result: PASS

至此全部安装完成。

 
 
 

转载于:https://www.cnblogs.com/Summerwuuuu/p/6688547.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值