zookeeper安装-单机版

1.源自http://zookeeper.apache.org

    1.1从镜像网站下载安装包。

            url:http://mirrors.shu.edu.cn/apache/zookeeper/zookeeper-3.3.6/ 这是3.3.6版本的

            也可以进入https://www.apache.org/dyn/closer.cgi/zookeeper/  自己选择镜像,然后选择版本

    1.2解压

            可以使用命令,如果未安装工具的情况下tar -zxvf 文件包 -C 指定路径

    1.3 改配置

            http://zookeeper.apache.org/doc/r3.4.11/zookeeperStarted.html#sc_Download 这里有提到

            To start ZooKeeper you need a configuration file. Here is a sample, create it in conf/zoo.cfg:                

                tickTime=2000
                dataDir=/var/lib/zookeeper
                clientPort=2181

            那就在解压后的conf路径下增加这个文件,或者直接将zoo_sample.cfg改名为zoo.cfg,参数解析

            

This file can be called anything, but for the sake of this discussion call it conf/zoo.cfg. Change the value of dataDir to specify an existing (empty to start with) directory. Here are the meanings for each of the fields:

tickTime

the basic time unit in milliseconds used by ZooKeeper. It is used to do heartbeats and the minimum session timeout will be twice the tickTime.

dataDir

the location to store the in-memory database snapshots and, unless specified otherwise, the transaction log of updates to the database.

clientPort

the port to listen for client connections

       不一一翻译了,dataDir这个存储日志和数据库快照等,路径请先创建好

    

    1.3 启动

             ./zkServer.sh start

    1.4 连接        

            ./zkCli.sh -server 127.0.0.1:2181

    

    1.5 连接

        测试:输入help

        

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值