Kafka安装

环境

系统:CentOS 6.7
软件:kafka_2.11-0.10.1.1.tgz

kafka安装

  • 下载二进制包
    地址:https://kafka.apache.org/downloads

  • 安装配置

    # tar -zxvf kafka_2.11-0.10.1.1.tgz
    # mv kafka_2.11-0.10.1.1 /usr/local/kafka
    
  • 配置环境变量

    # vim /etc/profile
    export PATH=/usr/local/kafka/bin:$PATH
    
    # source /etc/profile
    
  • 配置

    # ln -s /usr/local/kafka/config /etc/kafka
    

kafka启动

  • 启动

    # /usr/local/kafka/bin/zookeeper-server-start.sh -daemon /etc/kafka/zookeeper.properties
    # /usr/local/kafka/bin/kafka-server-start.sh -daemon /etc/kafka/server.properties
    
  • 开机启动

    # vim /etc/rc.local
    source /etc/profile
    /usr/local/kafka/bin/zookeeper-server-start.sh -daemon /etc/kafka/zookeeper.properties
    /usr/local/kafka/bin/kafka-server-start.sh -daemon /etc/kafka/server.properties
    

你可能感兴趣的:(Kafka安装)