码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • Mac M3 Pro 安装 Zookeeper-3.4.6


    1、下载安装包

    官方下载地址:https://archive.apache.org/dist/zookeeper/

    网盘下载地址:https://pan.baidu.com/s/1j6iy5bZkrY-GKGItenRB2w?pwd=irrx 提取码: irrx

    2、解压并添加环境变量

    1. # 将安装包移动到目标目录
    2. mv ~/Download/zookeeper-3.4.6.tar.gz /opt/module
    3. # 进入目标目录
    4. cd /opt/module
    5. # 解压安装包
    6. tar -zxvf zookeeper-3.4.6.tar.gz
    7. # 修改目录名称
    8. mv zookeeper-3.4.6 zookeeper
    9. # 进入软件目录
    10. cd zookeeper
    11. # 创建data目录
    12. mkdir data
    13. #添加环境变量
    14. sudo vim /etc/profile
    15. export JAVA8_HOME="/Library/Java/JavaVirtualMachines/jdk8/Contents/Home"
    16. alias java8="export JAVA_HOME=$JAVA8_HOME"
    17. export JRE_HOME=${JAVA_HOME}/jre
    18. export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
    19. export MAVEN_HOME="/Library/Java/apache-maven-3.8.8"
    20. export ZOOKEEPER_HOME=/opt/module/zookeeper
    21. export PATH="$JAVA_HOME/bin:$MYSQL_HOME/bin:$MAVEN_HOME/bin:$ZOOKEEPER_HOME/bin:$PATH:."

    3、修改配置文件 

    1. cd conf
    2. cp zoo_sample.cfg zoo.cfg

    以下是zoo.cfg的内容

    1. # The number of milliseconds of each tick
    2. tickTime=2000
    3. # The number of ticks that the initial
    4. # synchronization phase can take
    5. initLimit=10
    6. # The number of ticks that can pass between
    7. # sending a request and getting an acknowledgement
    8. syncLimit=5
    9. # the directory where the snapshot is stored.
    10. # do not use /tmp for storage, /tmp here is just
    11. # example sakes.
    12. dataDir=/opt/module/zookeeper/data
    13. # the port at which the clients will connect
    14. clientPort=2181
    15. # the maximum number of client connections.
    16. # increase this if you need to handle more clients
    17. #maxClientCnxns=60
    18. #
    19. # Be sure to read the maintenance section of the
    20. # administrator guide before turning on autopurge.
    21. #
    22. # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
    23. #
    24. # The number of snapshots to retain in dataDir
    25. #autopurge.snapRetainCount=3
    26. # Purge task interval in hours
    27. # Set to "0" to disable auto purge feature
    28. #autopurge.purgeInterval=1

     4、启动

    1. cd ..
    2. ./bin/zkServer.sh start
    3. # 查看进程是否存在
    4. jps
    5. # 如存在如下进程名表示启动了
    6. QuorumPeerMain

    5、检查是否成功

    ./bin/zkCli.sh

     成功后可以查看根节点、创建子节点等

     

  • 相关阅读:
    548 - Tree (UVA)
    【单片机基础】按键状态机实现短按、长按、双击、三击和N击
    HarmonyOS—端云一体化组件
    嵌入式系统使用网络镜像或使用网络更新镜像
    怎么把文字转成语音?好用的文字转语音软件有哪些?不妨试试这几个
    【计算机网络】http协议
    024. 解压报文[200 分]
    Maya——1——在maya中,用Arnold(阿诺德)还原Subtance Painter(sp)中的材质效果。
    JAVA xml格式转为java对象
    【官方标准】- 交通运输领域元数据标准规范
  • 原文地址:https://blog.csdn.net/k7gxn56/article/details/139697555
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号