linux下zookeeper的安装

zookeeper主页: https://zookeeper.apache.org/
下载镜像地址:http://www.apache.org/dyn/closer.cgi/zookeeper/
教程:https://zookeeper.apache.org/doc/r3.4.10/zookeeperStarted.html

安装

选择一个镜像地址进行下载,我们选最新的稳定版本
下载:wget http://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.4.10/zookeeper-3.4.10.tar.gz
解压:tar -xzvf zookeeper-3.4.10.tar.gz

Setting up a ZooKeeper server in standalone mode is straightforward. The server is contained in a single JAR file, so installation consists of creating a configuration.
Once you’ve downloaded a stable ZooKeeper release unpack it and cd to the root
To start ZooKeeper you need a configuration file. Here is a sample, create it in conf/zoo.cfg
意思是需要创建一个配置文件在 conf/zoo.cfg 目录,最简单的格式如下

tickTime=2000
dataDir=/var/lib/zookeeper
clientPort=2181
initLimit=5
syncLimit=2

或者复制一个配置文件 在conf目录下
cp -a zoo_sample.cfg zoo.cfg
记得修改配置

启动:

启动服务器
bin/zkServer.sh start

Using config: /root/zookeeper/zookeeper-3.4.10/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED

连接一个客户端
bin/zkCli.sh -server 127.0.0.1:2181

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值