centos6.10安装kafka

1、安装jdk
export JAVA_HOME=/root/awin/jdk1.8.0_181
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
2、解压kafka
kafka_2.12-2.2.0.tgz
3、启动zookeeper,kafka目录下执行
bin/zookeeper-server-start.sh -daemon config/zookeeper.properties
4、启动kafka,kafka目录下执行
bin/kafka-server-start.sh -daemon config/server.properties
5、查看服务是否启动
centos6.10安装kafka_第1张图片
clipboard.png
6、远程访问

kafka_2.12-2.2.0/config/server.properties中增加如下配置并重启

listeners=PLAINTEXT://:9092
advertised.host.name=192.168.31.198
advertised.port=9092

kafka主要配置
https://www.cnblogs.com/yinchengzhe/p/5111635.html

你可能感兴趣的:(centos6.10安装kafka)