美文网首页
Kafka安装部署教程

Kafka安装部署教程

作者: 廣_850e | 来源:发表于2019-10-25 19:03 被阅读0次

    环境准备

    java 1.8

    创建目录

    mkdir /opt/zookeeper

    mkdir /opt/kafka_client

    下载安装zookeeper

    wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.5.6/apache-zookeeper-3.5.6-bin.tar.gz

    解压zookeeper

    tar -zxvf apache-zookeeper-3.5.6-bin.tar.gz -C /opt/zookeeper/

    移动

    mv /opt/zookeeper/apache-zookeeper-3.5.6-bin/* -C /opt/zookeeper/

    修改配置

    cd /opt/zookeeper/conf

    mv zoo_sample.cfg zoo.cfg

    vim zoo.cfg

    修改dataDir配置项为dataDir=/opt/zookeeper/data

    启动zookeeper

    cd /opt/zookeeper/bin

    ./zkServer.sh start

    下载安装kafka

    wget http://mirrors.tuna.tsinghua.edu.cn/apache/kafka/2.3.1/kafka_2.12-2.3.1.tgz

    解压

    tar -zxvf kafka_2.12-2.3.1.tgz -C /opt/kafka_client

    移动

    mv /opt/kafka_client/kafka_2.12-2.3.1/* /opt/kafka_client

    启动kafka

    cd /opt/kafka_client/bin./kafka-server-start.sh -daemon config/server.properties

    相关文章

      网友评论

          本文标题:Kafka安装部署教程

          本文链接:https://www.haomeiwen.com/subject/nndevctx.html