1.安装
[root@ls_t3rdypvp ~]# tar -zxvf kafka_2.13-2.7.1.tgz
[root@ls_t3rdypvp ~]# mv kafka_2.13-2.7.1 kafka
[root@ls_t3rdypvp ~]# mv kafka /usr/local/
2.配置
[root@ls_t3rdypvp config]# cd /usr/local/kafka/config
[root@ls_t3rdypvp config]# vim server.properties
log.dirs=/data/logs/kafka #存储和日志的路径
listeners=PLAINTEXT://0.0.0.0:9092 # 监听地址
advertised.listeners=PLAINTEXT://代理地址 服务器ip:9092
3.启动
[root@ls_t3rdypvp ] # nohup /usr/local/kafka/bin/kafka-server-start.sh /usr/local/kafka/config/server.properties &>/data/logs/kafka/kafka.log &
[root@ls_t3rdypvp kafaka]# netstat -lntup|grep 9092