Zookeeper简单应用(单机)
2015-06-05 10:51
225 查看
简单的zookeeper单机安装部署,类似安装部署手册吧~
以sthe账户为例安装zookeeper
1. zookeeper安装包zookeeper-3.4.6.tar.gz上传至home目录下。(rz 命令 或者 secureFX工具)
2. 解压安装包
3. 配置文件修改
[sthe@server conf]$ vi zoo.cfg
# The number of milliseconds of each tick
# tickTime:这个时间是作为Zookeeper服务器之间或客户端与服务器之间维持心跳的时间间隔,也就是每个tickTime时间就会发送一个心跳。
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.
# do not use /tmp for storage, /tmp here is just
# example sakes.
#dataDir:Zookeeper保存数据的目录,默认情况下,Zookeeper将写数据的日志文件也保存在这个目录里。
#dataDir=/tmp/zookeeper 这个是默认的
dataDir=/home/sthe/zookeeper-3.4.6/data
# the port at which the clients will connect
#clientPort:这个端口就是客户端连接Zookeeper服务器的端口,Zookeeper会监听这个端口,接受客户端的访问请求。
clientPort=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
保存退出配置就完了
启动:cd /home/sthe/zookeeper-3.4.6/bin 执行 ./zkServer.sh start
状态:./zkServer.sh status
关闭:./zkServer.sh stop
上个图:
以sthe账户为例安装zookeeper
1. zookeeper安装包zookeeper-3.4.6.tar.gz上传至home目录下。(rz 命令 或者 secureFX工具)
2. 解压安装包
3. 配置文件修改
[sthe@server conf]$ vi zoo.cfg
# The number of milliseconds of each tick
# tickTime:这个时间是作为Zookeeper服务器之间或客户端与服务器之间维持心跳的时间间隔,也就是每个tickTime时间就会发送一个心跳。
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.
# do not use /tmp for storage, /tmp here is just
# example sakes.
#dataDir:Zookeeper保存数据的目录,默认情况下,Zookeeper将写数据的日志文件也保存在这个目录里。
#dataDir=/tmp/zookeeper 这个是默认的
dataDir=/home/sthe/zookeeper-3.4.6/data
# the port at which the clients will connect
#clientPort:这个端口就是客户端连接Zookeeper服务器的端口,Zookeeper会监听这个端口,接受客户端的访问请求。
clientPort=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
保存退出配置就完了
启动:cd /home/sthe/zookeeper-3.4.6/bin 执行 ./zkServer.sh start
状态:./zkServer.sh status
关闭:./zkServer.sh stop
上个图:
相关文章推荐
- Echarts 的例子
- Android bluetooth介绍(二): android 蓝牙代码架构及其uart 到rfcomm流程
- 搜集的一些scala学习资源
- 用EnableMenuItem不能使菜单变灰的原因
- Qt出现警告 Unescaped backslashes are deprecated!解决办法
- Json简单学习
- 一些小知识记录
- mysql主从复制讲解
- mysql主从复制讲解
- SAT考试填空习题(一)及答案
- Handheld.PlayFullScreenMovie 检测是否结束
- Android设计模式源码解析之策略模式
- 从命令行中输入一个字符串,要求从中随机选择6个字符
- Lua使用优化建议
- c++ 适配器模式(adapter)2
- How to get service execuable path
- javascript转换日期字符串为Date对象
- 简介JavaScript中Boolean.toSource()方法的使用
- Yii2 Model的一些常用rules规则
- ZOJ3820 Building Fire Stations(贪心)