1.启动zookeeper
nohup bin/zookeeper-server-start.sh config/zookeeper.properties > zookeeper_nohup.log 2>&1 &
2.启动kafka -server
nohup bin/kafka-server-start.sh config/server.properties > kafka_server_nohup.log 2>&1 &
3.启动kafka的生产者(可换成其他生产者)
nohup bin/kafka-console-producer.sh-broker-list 192.168.0.99:9092 --topic test > producer_nohup.log 2>&1 &
4.启动kafka的消费者(可换成其他消费者)
bin/kafka-console-consumer.sh --zookeeper 192.168.0.99:2181 --topic test --from-beginning > consumer_nohup.log 2>&1 &