当前位置: 首页 > article >正文

centos7安装单机zookeeper

下载安装包并解压:apache-zookeeper-3.4.14-bin.tar.gz

#解压
tar -zxvf /usr/local/kafka/apache-zookeeper-3.4.14-bin.tar.gz
#重命名
mv apache-zookeeper-3.4.14-bin zookeeper-3.4.14  

修改zookeeper配置:

#进入配置目录
cd /usr/local/kafka/zookeeper-3.4.14/conf/
#复制配置文件
cp zoo_sample.cfg 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

启动zookeeper:

#进入bin目录
cd /usr/local/kafka/zookeeper-3.4.14/bin
#启动
./zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /usr/local/kafka/zookeeper-3.4.14/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
#查看启动状态
./zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /usr/local/kafka/zookeeper-3.4.14/bin/../conf/zoo.cfg
Mode: standalone
原文地址:https://blog.csdn.net/Linging_24/article/details/146434111
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.kler.cn/a/597517.html

相关文章:

  • WEB攻防- PHP反序列化属性权限特征原生类 TIPS字符串逃逸CVE 绕过漏洞
  • 「JavaScript深入」WebSocket:高效的双向实时通信技术
  • Java 用二维数组输出三角形排列的字母
  • 盘泰UV种植体:抗老化新科技,焕发种植牙新活力
  • 当科技业成为系统性压榨的绞肉机
  • 【鸿蒙开发】Hi3861学习笔记- WIFI应用STA连接网络
  • nvm 安装某个node.js版本后不能使用或者报错,或不能使用npm的问题
  • 【IDEA】IDEA常用快捷键(适应包括xml所有类型文件)
  • stm32f103 boot引脚
  • 【java面试】线程篇
  • Java——Random库
  • Godot读取json配置文件
  • 从“制造”到“智造”,看中集“灯塔”生产线与永洪“数据技术”的紧密融合
  • 深度学习--链式法则
  • RK3588开发笔记-RTL8852wifi6模块驱动编译报错解决
  • Starrocks 命令 Alter table DISTRIBUTED 重分布数据的实现
  • Java常用类
  • 使用Aspera高速上传文件到ncbi
  • Mac | Excel | 列数改为和行数一样用数字表示
  • 操作系统为ubantu的服务器上部署nginx软件基础步骤总结