Zookeeper安装部署
来源:互联网 发布:大数据知识框架 编辑:程序博客网 时间:2024/06/02 05:30
一、ZooKeeper的安装模式分为三种:
1、单机模式(stand-alone)
2、集群模式
3、集群伪分布模式。
二、集群伪分布模式就是在单机下模拟集群的ZooKeeper服务,以下介绍得就是windows下集群伪分布的安装模式:
1、首先安装部署完zookeeper;
2、在bin目录下:D:\software\zookeeper-3.4.6\bin ,新建zkServer_1.cmd、zkServer_2.cmd、zkServer_3.cmd,复制zkServer.cmd即可;
3、zkServer_1.cmd、zkServer_2.cmd、zkServer_3.cmd修改内容:
三个文件分别在set ZOOMAIN=org.apache.zookeeper.server.quorum.QuorumPeerMain这句下面添加
set ZOOCFG=..\conf\zoo1.cfg
set ZOOCFG=..\conf\zoo2.cfg
set ZOOCFG=..\conf\zoo3.cfg
4、在conf目录下:D:\software\zookeeper-3.4.6\conf,新建zoo1.cfg、zoo2.cfg、zoo3.cfg,复制zoo.cfg即可;
5、zoo1.cfg、zoo2.cfg、zoo3.cfg修改内容如下:
# example sakes.
dataDir=D:/software/zookeeper-3.4.6/d_1 (依次设置为d_1、d_2、d_3)
dataLogDir=D:/software/zookeeper-3.4.6/logs
# the port at which the clients will connect
clientPort=2181 (依次设置为2181、2182、2183)
server.1=localhost:2887:3887
server.2=localhost:2888:3888
server.3=localhost:2889:3889
(server.*=IP:2887:3887 中, IP指示的是组成ZooKeeper服务的机器IP地址, 2887 为用来进行leader选举的端口,3887为组成 ZooKeeper服务的机器之间通信的端口。 集群伪分布模式我们使用每个配置文档模拟一台机器,也就是说,需要在单台机器上运行多个zookeeper实例。但是,我们必须要保证各个配置文档的clientPort不能冲突。)
6、在zoo.cfg中根据设置的dataDir新建对应的文件:
在D:/software/zookeeper-3.4.6下分布新建d_1、d_2、d_3;
在d_1、d_2、d_3下分别新建myid文件(没有后缀.pid哦),内容依次为server.*配置的值,所以值分别是1、2、3;
复制D:\software\zookeeper-3.4.6\data下面文件夹version-2分别到d_1、d_2、d_3;
d_1/d_3/d_3目录结构和zookeeper本身默认data一致;
7、分别启动:zkServer_1.cmd、zkServer_2.cmd、zkServer_3.cmd即可;
- zookeeper的安装部署
- zookeeper安装部署
- ZooKeeper安装部署
- zookeeper安装部署
- zookeeper安装部署
- zookeeper 安装部署
- Zookeeper安装部署
- Zookeeper 安装和部署
- RHEL7安装部署ZooKeeper
- Zookeeper安装部署
- zookeeper安装部署
- ZooKeeper安装与部署
- Zookeeper 安装和部署
- Zookeeper的安装部署
- Zookeeper安装与部署
- ZooKeeper分布式 安装部署
- hadoop + zookeeper 安装部署
- zookeeper安装部署
- Node.js Stream(流)
- spring整合dubbo-2.5.3(使用TCP广播或者zookeeper 暴露和发现服务)
- iOS蓝牙4.0 CoreBluetooth框架开发
- Android: Your project contains error(s),please fix them before running your application问题
- centos7 部署svn服务器
- Zookeeper安装部署
- cocoa pods 安装教程
- RGB颜色对照表
- servlet&&jsp
- CoreOS部署及应用
- 【趣味数学】不使用第三个变量交换两变量的值(推理过程)
- Node.js模块系统
- acm算法分类
- 交叉编译 PPPoE 和 PPP