Administrator
发布于 2024-06-13 / 43 阅读
0
0

zookeeper安装部署(centos7)

zookeeper安装部署(linux)

准备

  • 版本包

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

安装

  1. 下载版本

    wget https://archive.apache.org/dist/zookeeper/zookeeper-3.6.4/apache-zookeeper-3.6.4-bin.tar.gz
    
  2. 解压

    tar -zxvf apache-zookeeper-3.6.4-bin.tar.gz
    
  3. 进入配置目录,自定义配置

    cd ./apache-zookeeper-3.6.4-bin/conf
    cp zoo_sample.cfg zoo.cfg
    # 修改AdminServer端口,3.5版本开始默认占用8080端口
    admin.serverPort=18080
    
  4. 添加环境变量

    vi /etc/profile
    # 文件末尾添加以下内容
    #zookeeper
    export ZOOKEEPER_HOME=/usr/local/apache-zookeeper-3.6.4
    export PATH=$ZOOKEEPER_HOME/bin:$PATH
    export PATH
    #使其生效
    source /etc/profile
    
  5. 启动zookeeper服务

    cd ./apache-zookeeper-3.6.4-bin/bin
    sh zkServer.sh start
    
  6. 客户端登录

    sh zkCli.sh
    
  7. 查看路径权限

    # zkCli登录后
    getAcl /
    


评论