Zookeeper--单机模式安装 及命令

下载地址: http://zookeeper.apache.org/releases.html

tar -zxvf zookeeper-3.4.10.tar.gz

mv zookeeper-3.4.10 /Users/LG/tools/zookeeper-3.4.10

cd /Users/LG/tools/zookeeper-3.4.10

conf目录下新建配置文件zoo.cfg,内容如下:

# The number of milliseconds of each tick
tickTime= # The number of ticks that the initial synchronization phase can take
initLimit= # The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit= # the directory where the snapshot is stored.
dataDir=../tmp/zookeeper # the port at which the clients will connect
clientPort=

---

然后cd bin

./zkServer.sh start    #启动zk服务

./zkCli.sh    #进入zk命令工具

./zkServer.sh stop #关闭zk服务

zkCli.sh基本命令列表:

help 查看帮助

ls 查看子节点,如 ls /;   ls /mynode;  ls /znodes/node1

create 创建节点, 如 create /mynode mydate

get 获取数据, 如 get /mynode

set 更新数据, 如 set /mynode update1

stat 查看详细,如 stat /

delete 删除节点,  如 delete /mynode

quit 退出命令工具

close 关闭zk服务

Zookeeper四字母组合命令:

在ZK启动后,使用nc命令或telnet命令可以向ZK发送指令,如 echo ruok | nc localhost 2181 ,zk会返回 imok 表示zk正常运行

其他命令:

end

Zookeeper--安装及命令的更多相关文章

  1. Zookeeper 安装及命令行操作

    [参考文章]:[分布式]Zookeeper使用--命令行 [参考文章]:zookeeper的数据模型 [参考文章]:zookeeper ACL使用 1. 安装包下载 官方下载地址 选择一个具体的版本进 ...

  2. 【分布式】ZooKeeper学习之一:安装及命令行使用

    ZooKeeper学习之一:安装及命令行使用 一直都想着好好学一学分布式系统,但是这拖延症晚期也是没得治了,所以干脆强迫自己来写一个系列博客,从zk的安装使用.客户端调用.涉及到的分布式原理.选举过程 ...

  3. Hadoop学习(5)-zookeeper的安装和命令行,java操作

    zookeeper是干嘛的呢 Zookeeper的作用1.可以为客户端管理少量的数据kvkey:是以路径的形式表示的,那就意味着,各key之间有父子关系,比如/ 是顶层key用户建的key只能在/ 下 ...

  4. ZooKeeper 安装部署及hello world(转)

    ZooKeeper  安装部署及hello world 先给一堆学习文档,方便以后查看官网文档地址大全:OverView(概述)http://zookeeper.apache.org/doc/r3.4 ...

  5. ZooKeeper学习第二期--ZooKeeper安装配置

    一.Zookeeper的搭建方式 Zookeeper安装方式有三种,单机模式和集群模式以及伪集群模式. ■ 单机模式:Zookeeper只运行在一台服务器上,适合测试环境:■ 伪集群模式:就是在一台物 ...

  6. Zookeeper安装部署

    Zookeeper安装 1. 安装 wget http://www.apache.org/dist//zookeeper/zookeeper-3.3.6/zookeeper-3.3.6.tar.gz ...

  7. ZooKeeper 安装部署及hello world

    ZooKeeper  安装部署及hello world 先给一堆学习文档,方便以后查看官网文档地址大全: OverView(概述)http://zookeeper.apache.org/doc/r3. ...

  8. ZooKeeper安装与运行

    ZooKeeper安装与运行 首先从官网下载ZooKeeper压缩包,然后解压下载得到的ZooKeeper压缩包,发现有“bin,conf,lib”等目录.“bin目录”中存放有运行脚本:“conf目 ...

  9. 【Zookeeper】Zookeeper安装配置

    本文演示使用三台Linux服务器安装Zookeeper,使用的是zookeeper-3.4.5版本,将zookeeper-3.4.5.tar.gz上传到linux服务器, 使用如下命令解压到/usr/ ...

  10. Zookeeper系列一:Zookeeper介绍、Zookeeper安装配置、ZK Shell的使用

    https://www.cnblogs.com/leeSmall/p/9563547.html 一.Zookeeper介绍 1. 介绍Zookeeper之前先来介绍一下分布式 1.1 分布式主要是下面 ...

随机推荐

  1. PHP trim()函数的作用和使用方法

    PHP trim()函数一般是用来去除字符串首尾处的空白字符(或者其他字符),一般在用在服务端对接收的用户数据进行处理,以免把用户误输入的空格存储到数据库,下次对比数据时候出错. 该函数有两个参数,第 ...

  2. avr 烧录失败

    用Atmel studio 6.0 配置mkII烧录器 使用上位机bat程序烧录 提示错误:firmware is old... 1参考(关于FUSe setting) http://www.cnbl ...

  3. jQuery 滑动选项卡jQuery tabslet

    Tabslet   Yet another jQuery plugin for tabs, lightweight, easy to use and with some extra features ...

  4. vueRouter中scrollBehavior实现滚动固定位置

    使用前端路由,当切换到新路由时,想要页面滚到顶部,或者是保持原先的滚动位置,就像重新加载页面那样. vue-router 能做到,而且更好,它让你可以自定义路由切换时页面如何滚动. 注意: 这个功能只 ...

  5. Freemaker的java.beans.IntrospectionException: type mismatch between read and write methods

    引言:freemaker在特定的spring以及jdk下的问题解决路径. 环境描述 spring 3.1.1, jdk1.8u80, freemake 2.3.19 错误信息描述: 严重: Excep ...

  6. Softmax 函数的特点和作用

    ---------- 因为这里不太方便编辑公式,所以很多公式推导的细节都已经略去了,如果对相关数学表述感兴趣的话,请戳这里的链接Softmax的理解与应用 - superCally的专栏 - 博客频道 ...

  7. [Linux] 终端设置只显示当前目录及终端美化

    1.只显示当前目录 vim ~/.bashrc 找到位置: if [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($d ...

  8. chrome 55 zepto tap事件出错?

    刚才升级chrome后发现的,在54.0.2840.98上点击没有问题,在新升级的55.0.2883.75 上点击后会报错Cannot read property 'trigger' of undef ...

  9. matlab图像处理注意溢出!先要im2double!

    imagedata_comb=imagedata_ebic*addnumber_ebic+imagedata_sem*addnumber_sem; %注意溢出啊!!!uint8最大值是255,也就是说 ...

  10. ubuntu 安装nodejs/npm

    安装发行稳定版 Ubuntu 默认仓库里带有Node.js,版本较旧,这并不是最新版,但是应该很稳定.执行如下命令:   1 2 sudo apt-getupdate sudo apt-getinst ...