进入kafka目录
启动
1、启动zookeeper
//挂起运行bin/zookeeper-server-start.sh config/zookeeper.properties//后台运行nohup bin/zookeeper-server-start.sh config/zookeeper.properties >/dev/null 2>&1 &
2、启动kafka
//挂起运行bin/kafka-server-start.sh config/server.properties//后台运行nohup bin/kafka-server-start.sh config/server.properties >/dev/null 2>&1 &
关闭
1、关闭kafka
关闭挂起运行ctrl+c//关闭后台运行bin/kafka-server-stop.sh
2、关闭zookeeper
关闭挂起运行ctrl+c//关闭后台运行bin/zookeeper-server-stop.sh
来源地址:https://blog.csdn.net/qq_26287401/article/details/126056821