linux(deepin) 安装zookeeper

打开 https://zookeeper.apache.org/releases.html

选择最新版本 

Apache ZooKeeper 3.6.1

Apache ZooKeeper 3.6.1(ascsha512)

Apache ZooKeeper 3.6.1 Source Release(ascsha512)

记住: 选择上面那个,启动的时候会报错

 错误: 找不到或无法加载主类org.apache.zookeeper.server.quorum.QuorumPeerMain

参照:https://blog.csdn.net/jiangxiulilinux/article/details/96433560

下载 wget https://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.6.1/apache-zookeeper-3.6.1-bin.tar.gz

然后解压  tar -zxvf  文件.

然后 进去安装目录  cd 到conf

cp zoo_sample.cfg  zoo.cfg

vim zoo.cfg

#dataDir=/tmp/zookeeper
dataDir=/home/larance/soft/zookeeper/data
dataLogDir=/home/larance/soft/zookeeper/log 

# the port at which the clients will connect
clientPort=2181
server.1=127.0.0.1:2888:3888
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60

然后创建相关目录

在data 目录下 

touch myid

vim myid  填写内容1,就是zoo.cfg文件里server.1的数字对应

启动服务端

切换bin 目录 

启动  ./zkServer.sh start

关闭 ./zkServer.sh stop

启动客户端 

./zkCli.sh -server 127.0.0.1:2181

参考 https://www.cnblogs.com/expiator/p/9853378.html

https://blog.csdn.net/fengchen0123456789/article/details/82220522

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

larance

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值