ubuntu 16.04安装zookeeper
来源:互联网 发布:淘宝客服周总结计划 编辑:程序博客网 时间:2024/06/06 21:00
搭建环境
- ubuntu 16.04 LTS
- zookeeper-3.5.1-alpha
- dubbo 调用
搭建过程
使用官方源码包进行安装
资源准备
zookeeper-3.5.1-alpha.tar.gz 源码包
官方稳定版下载地址http://apache.fayea.com/zookeeper/
开始安装
解压压缩包到指定目录
tar -zxvf zookeeper-3.5.1-alpha.tar.gz -C /home/zhoudazhuang/local/
使用第一步解压的源码包路径,cd /home/zhoudazhuang/local/zookeeper-3.5.1-alpha/conf 拷贝一份zoo_sample.cfg ,并命名为zoo.cfg
编辑zoo.cfg
vim zoo.cfg
主要修改这几个地方:
- 增加dataDir和dataLogDir节点(目录自己创建并指定,作为数据存储目录和日志文件目录,很有用),增加配置如下:```dataDir=/home/strong/usr/local/zookeeper-3.5.1-alpha/data dataLogDir=/home/strong/usr/local/zookeeper-3.5.1-alpha/logs```- 指定server地址 ```server.1=172.16.64.125:2888:3888``` *注:server.id=hostname:port:port。第一个端口用于集合体中的 follower 以侦听 leader;第二个端口用于 Leader 选举。第一个hostname即为本服务器地址*完整配置如下:
# 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=/home/strong/usr/local/zookeeper-3.5.1-alpha/datadataLogDir=/home/strong/usr/local/zookeeper-3.5.1-alpha/logs# the port at which the clients will connectclientPort=2181server.1=172.16.64.125:2888:3888# 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
在上一步设置的data目录中新建文件mydata,并填入上一步中配置的server.1中的数字,我这里是1,这里相当于是编了号的服务器,有多台可参考此配置。
在系统变量path中加入zookeeper (此处可省略)
export ZOOKEEPER_HOME=/home/hadooptest/zookeeper-3.4.3
PATH=$ZOOKEEPER_HOME/bin:$PATHzookeeper服务的启动与客户端的连接(调用命令在zookeeper的bin文件夹)
zkServer.sh start
zkCli.sh -server 172.16.64.125:2181(此处我在172.16.64.111中客户端对服务端进行调用)
参考
- zookeeper官方参考文档1http://www.cloudera.com/content/www/zh-CN/documentation/enterprise/5-3-x/topics/cdh_ig_zookeeper_package_install.html
- zookeeper官方参考文档2http://zookeeper.majunwei.com/document/3.4.6/GettingStarted.html
- https://my.oschina.net/phoebus789/blog/730787
0 0
- ubuntu 16.04安装zookeeper
- 【Linux进阶】ubuntu 16.04安装zookeeper
- Ubuntu安装zookeeper
- Ubuntu 安装配置Zookeeper
- Ubuntu 安装 ZooKeeper
- Ubuntu下ZooKeeper安装过程
- zookeeper-ubuntu单机版安装
- Linux系统Ubuntu安装zookeeper
- Ubuntu下ZooKeeper安装过程
- Ubuntu 16.04 LTS安装部署zookeeper-3.5.1-alpha
- ubuntu下Zookeeper伪分布安装
- Ubuntu下ZooKeeper安装过程 (转)
- ubuntu下 zookeeper的安装、启动、停止
- Ubuntu 安装Zookeeper并使用集群配置
- ubuntu下 Zookeeper安装与集群
- Ubuntu下安装和使用zookeeper和kafka
- zookeeper 在ubuntu linux虚拟机上的安装
- zookeeper安装
- homerHEVC代码阅读(39)——熵编码(3)熵编码初始化和启动熵编码模型
- powerDesigner设计数据模型
- VS C++ 服务端响应WebSocket连接生成握手字符串
- 垂直搜索引擎开发
- javaweb高级编程实验(吊炸天留言板系统--struts2,mysql,bootstraps3撰写,内附实验报告)
- ubuntu 16.04安装zookeeper
- base64字符串转化成图片
- 常见MIME文件类型
- 构造方法
- java-抽象类和接口的区别
- getcwd()、__DIR__、__FILE__
- 封装Redis部分基本操作(键值都封装为对象类型)
- 王朝 第十二周 连续乘法问题 1*3*5.......
- 文章标题