PATH=$KAFKA_HOME/bin:$JAVA_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$PATH
export KAFKA_HOME=/home/hadoop/app/kafka_2.11-2.4.1
kafka-server-start.sh /home/hadoop/app/kafka_2.11-2.4.1/config/server.properties
kafka要集群中过半开启
kafka启动:
我这里的安装目录是:/home/bigdata/kafka , 节点名称为 localhadoop1
进入安装目录后输入
bin/kafka-server-start.sh config/server.properties &(后台运行)
bin/kafka-server-start.sh con前台进程:
在每个节点执行
kafka-server-start.sh kafka。。。/config/server.properties
fig/server.properties (运行)
kafka-server-stop.sh{KAFKA_HOME}/config/server.properties
fig/server.properties (关闭)
后台进程: nohup kafka-server-start.sh {KAFKA_HOME}/config/server.properties 1>/dev/null 2>&1 &
- Kafka关闭命令
注:先进入kafka目录
bin/kafka-server-stop.sh