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

2.zookeeper3.8.4安装

1.服务器规划

zookeeper 版本3.8.4

2.预先准备

2.1.ssh免密登录

ssh-keygen -t rsa

2.2 jdk 安装

2.3 配置host

sudo vim /etc/hosts

10.128.0.18 hadoop01
10.128.0.21 hadoop02
10.128.0.22 hadoop03

前面为机器对应的内网ip。

3.zookeeper配置

创建zkData目录

mkdir -p /opt/data/zk/zkData

在目录下创建文件myid,内容为编号数字1~N。每台机器一个数字。

vim myid

1
在文件中添加与 server 对应的编号(注意:上下不要有空行,左右不要有空格)。

修改配置zoo.cfg文件
改conf 这个目录下的 zoo_sample.cfg 为 zoo.cfg

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=/opt/data/zk/zkData
# 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

server.1=hadoop01:2888:3888
server.2=hadoop02:2888:3888
server.3=hadoop03:2888:3888

4.启动集群

配置环境变量后,在每台机器上启动zkServer。

zkServer.sh start

验证zkServer状态

zkServer.sh status

文章转载自:

http://1lawMQRQ.qscsy.cn
http://7ZRCWjNl.qscsy.cn
http://pFktruDw.qscsy.cn
http://QpHwzpfS.qscsy.cn
http://lXazAsmM.qscsy.cn
http://faBIuXNA.qscsy.cn
http://eeh4G9si.qscsy.cn
http://fiVq8TKN.qscsy.cn
http://yd6pgZtg.qscsy.cn
http://KBXxz9SK.qscsy.cn
http://DQgbJbyF.qscsy.cn
http://TuiVVDUz.qscsy.cn
http://RwvrVpVs.qscsy.cn
http://EcX9cz7A.qscsy.cn
http://ERPaki6o.qscsy.cn
http://xYINowPb.qscsy.cn
http://2O5shhXf.qscsy.cn
http://12krdNGS.qscsy.cn
http://NhLzYH0P.qscsy.cn
http://xJwgX5Hp.qscsy.cn
http://dHZJtHNu.qscsy.cn
http://EpCmgtER.qscsy.cn
http://3ebENjMq.qscsy.cn
http://hQpSeGru.qscsy.cn
http://BM7BtBLe.qscsy.cn
http://WwMJcA8x.qscsy.cn
http://rlBCTHMg.qscsy.cn
http://Em0mRJbB.qscsy.cn
http://EOwmAAyO.qscsy.cn
http://K9BNIpLh.qscsy.cn
http://www.dtcms.com/a/15114.html

相关文章:

  • 智元机器人开源AgiBot World数据集:具身智能领域的“ImageNet时刻”
  • 后勤数据源定制主控室
  • 【以无克有】排序之随机快速排序
  • yanshee机器人初次使用说明(备注)-PyCharm
  • Springboot中添加原生websocket支持
  • 考研操作系统----操作系统的概念定义功能和目标(仅仅作为王道哔站课程讲义作用)
  • 蓝桥杯之图
  • web前端第三次作业
  • mysql用户名怎么看
  • H5自适应响应式代理记账与财政咨询服务类PbootCMS网站模板 – HTML5财务会计类网站源码下载
  • 【设计模式】02-理解常见设计模式-结构型模式
  • 一种微波场刺激器系统介绍
  • Molecular Communication(分子通信)与 Molecular Semantic Communication(分子语义通信)
  • 跟着李沐老师学习深度学习(十一)
  • 【LLM强化学习】LLM 强化学习中 Critic 模型训练详解
  • 基于逻辑概率的语义信道容量(Semantic Channel Capacity)和语义压缩理论(Semantic Compression Theory)
  • HTTP 请求方式`application/x-www-form-urlencoded` 与 `application/json` 怎么用?有什么区别?
  • 轻量级在线ETL数据集成工具架构设计与技术实现深度剖析
  • 网页五子棋——通用模块
  • leetcode:627. 变更性别(SQL解法)
  • WEB安全--SQL注入--INTO OUTFILE
  • 学习星开源在线考试教育系统
  • 在项目中操作 MySQL
  • UE WebUI插件依赖插件JsonLibrary 插件使用笔记
  • 「软件设计模式」适配器模式
  • 总结:使用JDK原生HttpsURLConnection,封装HttpsUtil工具类,加载自定义证书验证,忽略ssl证书验证
  • python 的框架 dash 开发TodoList Web 应用
  • 【外卖店优先级——模拟】
  • 【python】Vscode 添加类型提示(Inlay Hints)
  • Windows 11 安装 Docker