zookeeper-3.8.0安装(Windows)

本文涉及的产品
注册配置 MSE Nacos/ZooKeeper,182元/月
服务治理 MSE Sentinel/OpenSergo,Agent数量 不受限
云原生网关 MSE Higress,422元/月
简介: zookeeper-3.8.0安装(Windows)

一、下载解压

1、下载

https://archive.apache.org/dist/zookeeper/

 下载地址

https://archive.apache.org/dist/zookeeper/zookeeper-3.8.0/apache-zookeeper-3.8.0-bin.tar.gz

2、解压

二、修改配置文件

1、复制配置文件

复制apache-zookeeper-3.8.0-bin\conf目录下的zoo_sample.cfg,重名为zoo.cfg

2、修改配置文件

在apache-zookeeper-3.8.0-bin目录下新建data、log文件夹,

修改zoo.cfg中dataDair位置,如需修改端口,修改clientPort参数

三、启动zookeeper

点击zkServer.cmd启动zookeeper

如果框选位置为disable,修改zkServer.cmd


增加"-Dzookeeper.audit.enable=true"语句后重新启动

call %JAVA% "-Dzookeeper.audit.enable=true" "-Dzookeeper.log.dir=%ZOO_LOG_DIR%" "-Dzookeeper.log.file=%ZOO_LOG_FILE%" "-XX:+HeapDumpOnOutOfMemoryError" "-XX:OnOutOfMemoryError=cmd /c taskkill /pid %%%%p /t /f" -cp "%CLASSPATH%" %ZOOMAIN% "%ZOOCFG%" %*

四、测试

启动zkCli.cmd

五、修改涉及的文件

# 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=../data
dataLogDir=../log
# 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.
#
# https://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.httpHost=0.0.0.0
#metricsProvider.httpPort=7000
#metricsProvider.exportJvmInfo=true
 
@echo off
REM Licensed to the Apache Software Foundation (ASF) under one or more
REM contributor license agreements.  See the NOTICE file distributed with
REM this work for additional information regarding copyright ownership.
REM The ASF licenses this file to You under the Apache License, Version 2.0
REM (the "License"); you may not use this file except in compliance with
REM the License.  You may obtain a copy of the License at
REM
REM     http://www.apache.org/licenses/LICENSE-2.0
REM
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.
 
setlocal
call "%~dp0zkEnv.cmd"
 
set ZOOMAIN=org.apache.zookeeper.server.quorum.QuorumPeerMain
set ZOO_LOG_FILE=zookeeper-%USERNAME%-server-%COMPUTERNAME%.log
 
echo on
call %JAVA% "-Dzookeeper.audit.enable=true" "-Dzookeeper.log.dir=%ZOO_LOG_DIR%" "-Dzookeeper.log.file=%ZOO_LOG_FILE%" "-XX:+HeapDumpOnOutOfMemoryError" "-XX:OnOutOfMemoryError=cmd /c taskkill /pid %%%%p /t /f" -cp "%CLASSPATH%" %ZOOMAIN% "%ZOOCFG%" %*
 
endlocal




相关文章
|
19天前
|
人工智能 JavaScript 开发工具
极速上手!Claude Code 原生支持 Windows 免WSL安装教程
Claude Code 现已支持 Windows 原生运行,无需 WSL 配置。本文提供详细安装教程,涵盖 Node.js 环境验证、Git 安装及 Claude Code 配置步骤,助你快速上手这一强大 AI 编程工具。
433 4
|
2月前
|
Ubuntu Unix Linux
在Windows上轻松安装和使用Ubuntu的方法详解
继续点击“Continue”按钮以继续安装流程,随后选择清理磁盘并安装操作系统的选项。 接下来,在安装过程中,你需要选择时区。为了与你的地理位置相匹配,请选择中国上海作为你的时区设置。 在安装过程中,你还需要设置计算机的名称以及账号密码。请务必牢记这些信息,因为它们将作为你登录系统的凭证。
|
1月前
|
存储 虚拟化 Windows
VMware安装Windows10
本案例介绍了在Windows系统上使用VMware Workstation 17.5 Pro安装配置Windows 10虚拟机的详细步骤,包括所需设备、软件下载链接、虚拟机设置及系统安装全过程。
VMware安装Windows10
|
2月前
|
Ubuntu Linux Windows
如何在Ubuntu系统中安装Wine,借此来运行Windows程序
熟悉的登录画面出现,在Ubuntu系统中扫描登录微信程序。
|
2月前
|
Ubuntu Linux Shell
手把手教你安装适用于Linux的Windows子系统——Ubuntu
重启完成,你看看重新打开Ubuntu是不是发生了变化,等待几分钟,系统配置完成,根据提示设置用户名和密码即可
|
2月前
|
Ubuntu Linux 数据安全/隐私保护
Windows上快速安装Linux子系统Ubuntu
Installing, this may take a few minutes...WslRegisterDistribution failed with error: 0x800701bcError: 0x800701bc WSL 2 ?????????????????? https://aka.ms/wsl2kernelPress any key to continue... 原因是 wsl1 升级到 wsl2 之后,内核却没有升级。 解决:下载最新的wsl安装包(wsl安装包)
|
3月前
|
运维 Linux 虚拟化
VMware虚拟机安装教程,Windows下安装VMware虚拟机,附VMware下载,Windows各版本系统镜像下载
虚拟机技术允许一台物理机运行多个操作系统,提升资源利用率,节省成本。通过快照、克隆等功能,实现系统快速恢复与复制,提高运维效率。本文详细介绍VMware虚拟机的安装步骤、Windows镜像下载及系统安装激活流程,适合初学者快速入门。
803 0
|
3月前
|
Linux Docker Windows
windows docker安装报错适用于 Linux 的 Windows 子系统必须更新到最新版本才能继续。可通过运行 “wsl.exe --update” 进行更新。
适用于 Linux 的 Windows 子系统需更新至最新版本(如 wsl.2.4.11.0.x64.msi)以解决 2025 年 Windows 更新后可能出现的兼容性问题。用户可通过运行 “wsl.exe --update” 或访问提供的链接下载升级包进行更新。
872 0

热门文章

最新文章