Zookeeper--复制模式安装
参考:
https://www.cnblogs.com/lsdb/p/7297731.html
https://zookeeper.apache.org/doc/r3.4.13/zookeeperStarted.html#sc_RunningReplicatedZooKeeper
前提
JDK 6及其以上
安装
下载安装文件并上传到各目标机器
将下载好的 zookeeper-x.x.x.tar.gz 分别上传到目标机器,如 /usr/local/src ,当前下载的版本为3.4.9
我的目标机器
在各目标机器分别解压
在各目标机器创建软连接
在各目标机器创建配置文件
写入各目标机器的myid
(分别写入不同的myid, myid中的内容对应相关的server.x,即写入相应的ip的server的x值.如:192.168.10.130的myid配置成3)
打开各目标机器相应端口
分别启动
查看状态
相关配置解释(官方链接)
initLimit
initLimit is timeouts ZooKeeper uses to limit the length of time the ZooKeeper servers in quorum have to connect to a leader.
syncLimit
syncLimit limits how far out of date a server can be from a leader.
tickTime
the basic time unit in milliseconds used by ZooKeeper.(In this example, the timeout for initLimit is 5 ticks at 2000 milleseconds a tick, or 10 seconds. => initLimit timeout = initLimit * tickTime)
server.x=ip:port1:port2
Finally, note the two port numbers after each server name: " 2888" and "3888". Peers use the former port to connect to other peers. Such a connection is necessary so that peers can communicate, for example, to agree upon the order of updates. More specifically, a ZooKeeper server uses this port to connect followers to the leader. When a new leader arises, a follower opens a TCP connection to the leader using this port. Because the default leader election also uses TCP, we currently require another port for leader election. This is the second port in the server entry.
dataLogDir
The dataLogDir parameters indicates a different directory to use for the transaction logs.
myid
The entries of the form server.X list the servers that make up the ZooKeeper service. When the server starts up, it knows which server it is by looking for the file myid in the data directory. That file has the contains the server number, in ASCII.
在一台机器上部署复制模式的zookeeper(人们口中的伪集群)
If you want to test multiple servers on a single machine, specify the servername as localhost with unique quorum & leader election ports (i.e. 2888:3888, 2889:3889, 2890:3890 in the example above) for each server.X in that server's config file. Of course separate dataDirs and distinct clientPorts are also necessary (in the above replicated example, running on a single localhost, you would still have three config files).
Please be aware that setting up multiple servers on a single machine will not create any redundancy. If something were to happen which caused the machine to die, all of the zookeeper servers would be offline. Full redundancy requires that each server have its own machine. It must be a completely separate physical server. Multiple virtual machines on the same physical host are still vulnerable to the complete failure of that host.
Zookeeper--复制模式安装的更多相关文章
- 决战大数据之三-Apache ZooKeeper Standalone及复制模式安装及测试
决战大数据之三-Apache ZooKeeper Standalone及复制模式安装及测试 [TOC] Apache ZooKeeper 单机模式安装 创建hadoop用户&赋予sudo权限, ...
- zookeeper单机模式安装
zookeeper单机模式安装 更多文章:http://blogxinxiucan.sh1.newtouch.com/2017/07/26/zookeeper单机模式安装/ 下载zookeeper u ...
- Zookeeper本地模式安装
本地模式安装部署 1.安装前准备 (1)安装Jdk (2)拷贝Zookeeper安装包到Linux系统下 (3)解压到指定目录 tar -zxvf zookeeper-3.4.10.tar.gz -C ...
- Zookeeper安装,Zookeeper单机模式安装
http://zookeeper.apache.org/releases.html#download 下载解压到(我自己的)解压到 /usr/local 下 把名字改成 zookeeper 进入zoo ...
- zookeeper集群安装(转)
转载地址:http://www.blogjava.net/hello-yun/archive/2012/05/03/377250.html 本方法,本人亲自试验,可以成功. ZooKeeper是一个分 ...
- 8.3.ZooKeeper集群安装配置
1.Zookeeper的搭建方式 Zookeeper安装方式有三种,单机模式和集群模式以及伪集群模式. 单机模式:Zookeeper只运行在一台服务器上,适合测试环境: 伪集群模式:就是在一台物理机上 ...
- zookeeper三种模式安装详解(centos 7+zookeeper-3.4.9)
zookeeper有单机.伪集群.集群三种部署方式,可根据自己实际情况选择合适的部署方式.下边对这三种部署方式逐一进行讲解. 一 单机模式 1.下载 进入要下载的版本的目录,选择.tar.gz文件下载 ...
- window安装配置 zookeeper 单机模式
1.zookeeper简单介绍 zookeeper是一个分布式的,开放源码的分布式应用程序协调服务,我所了解到的主要的使用场景有两个 (1).微服务注册中心(Dubbo较常用Zookeeper做注册中 ...
- Zookeeper第一课 安装和配置
简介: Zookeeper,是Google的Chubby一个开源的实现,是Hadoop的分布式协调服务,它包含一个简单的原语集,来实现同步.配置维护.分集群.命名的服务. zookeeper是一个由多 ...
- HBase单机模式安装
第一部分 安装前准备 1.安装hadoop 今天刚刚学了hbase的一点基础,准备安装Hbase实际操练一下.因为安装hbase的前提条件是已经成功安装了hadoop,而且hadoop的版本要和hba ...
随机推荐
- Day8 - D - Multiplication Table CodeForces - 448D
Bizon the Champion isn't just charming, he also is very smart. While some of us were learning the mu ...
- wdcp升级php5.8到php7.1.12后安装swoole
http://pecl.php.net/package/swoole wget http://pecl.php.net/get/swoole-4.0.1.tgztar zxvf swoole-4.0. ...
- tp3.2 自带的文件上传及生成缩略图功能
public function upload_file($file_name,$width,$height) { //检查图片尺寸是否合法 $image_size = getimagesize($_F ...
- cmd命令打开本地*.db数据文件的一些坑
昨天刚看了下sqlite数据库,用的是cmd窗口 写的,建了几个表,今天在次打开,发现.问题有点小多啊.. 我也不知道我的数据库名字后面为啥会带 (“ : ”) 下面是我的数据文件: 刚开始看了下, ...
- Delphi IDFtp用法,包含断点续传
1 连接远程服务器procedure Connect(AAutoLogin: boolean; const ATimeout: Integer);2 改变目录procedure ChangeDir ...
- [题解] LuoguP2257 YY的GCD
传送门 给\(n,m\),让你求 \[ \sum\limits_{i=1}^n \sum\limits_{j=1}^m [\gcd(i,j) \in prime] \] 有\(T\)组询问\((T \ ...
- window 如何访问虚拟机的mapreduce(遇到的坑)
首先 先把你虚拟机和本机网络链接弄通 (详情看上一篇) 一些关于mapreduce 和hadoop的配置都在上一篇 安装eclipse 的hadoop Map/Reduce插件详情 看其他博客园.. ...
- L2d插件
<script src="https://blog-static.cnblogs.com/files/yyhh/L2Dwidget.min.js"></scrip ...
- idea开发springboot 的mysql数据库连接问题
今天在家用idea进行springboot开发,前面一些坑相对避免了,但是到数据库这块总是连接不上,报错主要是: Access denied for user 'root'@'localhost' ( ...
- 【STM32H7教程】第51章 STM32H7的LTDC应用之LCD汉字显示和2D图形显示
完整教程下载地址:http://www.armbbs.cn/forum.php?mod=viewthread&tid=86980 第51章 STM32H7的LTDC应用之LCD汉字 ...