CentOS7安装Kafka完整教程

1.进入/opt

cd /opt

2.解压Kafka安装包

tar -zxf kafka_2.11-2.0.0.tgz

3.移动解压后的kafaka到soft/kafka211

mv kafka_2.11-2.0.0.tgz  soft/kafka211

4.进入soft/kafka211/config/

cd soft/kafka211/config/

5.修改server.properties

vim server.properties

5.1给listeners,log.dirs和zookeeper.connect赋相应的值

listeners=PLAINTEXT://主机地址:9092
log.dirs=/opt/soft/kafka211/log
zookeeper.connect=主机地址:2181

6.修改/etc/profile

vim /etc/profile

6.1.添加kafka运行环境

#KAFKA ENV
export KAFKA_HOME=/opt/soft/kafka211
export PATH=$PATH:$KAFKA_HOME/bin

7.执行/etc/profile

source /etc/profile

8.执行以下命令,如果没有报错信息,则安装kafka成功!

kafka-server-start.sh /opt/soft/kafka211/config/server.properties

你可能感兴趣的:(kafka,centos,linux)