Zookeeper的单机模式(standalone)

Zookeeper三种部署模式

1、Standalone模式,单节点部署,适合测试环境。
2、伪cluster模式,单节点多实例部署,适合测试环境。
3、Cluster模式,多节点集群部署,适合生产环境。

安装前准备

安装jdk:参考https://my.oschina.net/dingyibo/blog/3158472
下载地址
CDH版:https://www.cloudera.com/documentation/enterprise/release-notes/topics/cdh_vd_cdh_package_tarball.html
Apache版:https://www.apache.org/dyn/closer.cgi/zookeeper/
解压安装(我选的是Apache版本)
[root@localhost ~]# tar zxvf apache-zookeeper-3.5.5-bin.tar.gz -C /usr/local/
配置zookeeper 
[root@localhost conf]# cd /usr/local/apache-zookeeper-3.5.5-bin/conf
[root@localhost conf]# cp zoo_sample.cfg zoo.cfg
[root@localhost conf]# more zoo.cfg
# 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.
dataDir=/tmp/zookeeper
# the port at which the clients will connect
clientPort=2181
启动测试(所有节点执行)
[root@localhost conf]# zkServer.sh start
[root@localhost conf]# zkServer.sh status 

参考:https://my.oschina.net/dingyibo/blog/3160232(Cluster模式)

https://www.cnblogs.com/lxs1314/p/7572092.html

 


版权声明:本文为wdnq1022原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。