前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >在CentOS6.9中搭建 Zookeeper

在CentOS6.9中搭建 Zookeeper

作者头像
北漂的我
发布2019-05-28 16:26:15
3490
发布2019-05-28 16:26:15
举报
文章被收录于专栏:北漂的我

下载 zookeeper-3.4.9.tar.gz 到机器上

代码语言:javascript
复制
tar -zxvf zookeeper-3.4.9.tar.gz
代码语言:javascript
复制
cd zookeeper-3.4.9
cp conf/zoo_sample.cfg conf/zoo.cfg

然后修改 zoo.cfg

代码语言:javascript
复制
# The number of milliseconds of each tick 
tickTime=2000 
# The number of ticks that the initial  
# synchronization phase can take 
initLimit=10 
# The number of ticks that can pass between  
# sending a request and getting an acknowledgement 
syncLimit=5 
# the directory where the snapshot is stored. 
# do not use /tmp for storage, /tmp here is just  
# example sakes. 
dataDir=/home/bigdata/software/zookeeper-3.4.9/zookeeper_data 
# the port at which the clients will connect 
clientPort=2181 
# The number of snapshots to retain in dataDir 
autopurge.snapRetainCount=5 
# Purge task interval in hours 
autopurge.purgeInterval=1 

进入Zookeeper安装目录, 启动 Zookeeper

代码语言:javascript
复制
bin/zkServer.sh start

验证是否启动 zookeeper 成功

  • 安装 nc
代码语言:javascript
复制
yum install nc 

运行以下命令 , 结果为 imok

代码语言:javascript
复制
echo ruok | nc master 2181 

注意: 上面命令中的 master 是你的主机名

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档