Zookeeper搭建集群
来源:互联网 发布:苏州淘宝美工培训 编辑:程序博客网 时间:2024/04/28 03:29
## Zookeeper搭建集群 ##
1.准备
操作系统:CentOS-7
环境:JDK8
安装包:zookeeper-3.4.10.tar
2.搭建zookeeper集群
1)解压二进制包
# tar zxvf zookeeper-3.4.9.tar.gz# mv zookeeper-3.4.9 zookeeper
2)拷贝配置文件
# cd zookeeper# cd conf# cp zoo_sample.cfg zoo.cfg
3)配置
# The number of milliseconds of each ticktickTime=2000# The number of ticks that the initial # synchronization phase can takeinitLimit=10# The number of ticks that can pass between # sending a request and getting an acknowledgementsyncLimit=5# the directory where the snapshot is stored.# do not use /tmp for storage, /tmp here is just # example sakes.//新增配置(以下路径是手动新建的)dataDir=/root/zookeeper/datadataLogDir=/root/zookeeper/logs# the port at which the clients will connectclientPort=2181# the maximum number of client connections.# increase this if you need to handle more clients#maxClientCnxns=60## Be sure to read the maintenance section of the # administrator guide before turning on autopurge.## http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance## The number of snapshots to retain in dataDir#autopurge.snapRetainCount=3# Purge task interval in hours# Set to "0" to disable auto purge feature#autopurge.purgeInterval=1//新增配置server.0=192.168.6.128:4001:4002server.1=192.168.6.129:4001:4002server.2=192.168.6.130:4001:4002
3.创建myid文件
分别在三台主机的 dataDir 路径下创建一个文件名为 myid 的文件,文件内容为该 zk 节点的编号。例如,在第一台主机上建立的 myid 文件内容是 0,第二台是 1。
4.启动zookeeper
# cd bin# ./zkServer.sh start
5.查看zookeeper服务
# cd bin# ./zkServer.sh status
说明集群搭建完毕
阅读全文
1 0
- Zookeeper 介绍 Zookeeper 搭建 Zookeeper 集群搭建
- zookeeper(3) zookeeper集群搭建
- zookeeper集群搭建
- zookeeper集群搭建
- hbase+zookeeper集群搭建
- ZooKeeper集群搭建
- zookeeper集群搭建
- Zookeeper 集群搭建
- zookeeper集群搭建
- zookeeper 集群搭建
- Zookeeper 集群搭建
- Zookeeper集群搭建
- zookeeper集群环境搭建
- Zookeeper集群搭建
- ZooKeeper集群搭建
- Zookeeper分布式集群搭建
- ZooKeeper集群搭建
- ZooKeeper集群搭建
- Kotlin基本类型自动装箱的一点问题
- oracle
- at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>错误
- <设计模式可复用面向对象软件的基础> [1.5]、单例(C#)
- 行人属性“Human Attribute Recognition by Deep Hierarchical Contexts”
- Zookeeper搭建集群
- Deferred 延迟渲染
- 一些简单的java实例
- 阿里云计算能力实现多项突破 BigBench规模全球首次被拓展至100TB
- 华为最热门的开源项目推荐!
- 网传王者荣耀员工年终奖100个月工资 腾讯:传言太离谱了
- 面试的妹纸问我:Web缓存设置不是后台的事情吗?
- Netflix 最热门的开源项目推荐
- linux下的pstack和gstack命令