apache-zookeeper-3.7.1 安装部署
apache-zookeeper-3.7.1 安装部署
下载地址:https://mirrors.bfsu.edu.cn/apache/zookeeper/
apache-zookeeper-3.7.1
1.下载直接解压,进入../conf/目录下复制一份zoo_sample.conf, 改名为zoo.cfg
配置参考一:
# The number of milliseconds of each tick 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=/tmp/zookeeper # the port at which the clients will connect 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 ## Metrics Providers # # https://prometheus.io Metrics Exporter #metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider #metricsProvider.httpPort=7000 #metricsProvider.exportJvmInfo=true dataDir=D:\\soft_position\\Java\\zzz_test\\apache-zookeeper-3.7.1\\data dataLogDir=D:\\soft_position\\Java\\zzz_test\\apache-zookeeper-3.7.1\\log admin.serverPort=8887
配置参考二:
# dataDir里放的是内存数据结构的snapshot dataDir=../data # 客户端连接zookeeper服务的端口 clientPort=2183 # 服务启动默认8080,避免和其他服务冲突配置8888 admin.serverPort=8888 # 配置zookeeper 的默认账号密码, 用于登入dubbo admin.root.user.name=root admin.root.user.password=root
2.启动 zookeeper,进入../bin/目录,Windows环境启动文件为zkServer.cmd,Linux环境启动文件为 zkServer.sh
zookeeper 启动
#在这个目录下面
D:\soft_position\Java\zzz_test\apache-zookeeper-3.7.1\bin
#双击 zkServer.cmd **** 启动**********
其他参考地址: 安装注册中心 zookeeper
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!