启动zookeeper、kafka并创建kafka主题
./bin/zkServer.sh start
./bin/kafka-server-start.sh -daemon ./config/server.properties
./bin/kafka-topic.sh --create --topic hunter --partitions 3 --replication-factor 1 --zookeeper localhost:9092
2、创建flume-kafka.conf配置文件
用于采集socket数据后存入kafka
在flume文件夹中的conf下新建flume-kafka.conf配置文件
vim flume-kafka.conf
a1.sources = s1
a1.channels = c1
a1.sinks = k1
a1.sources.s1.type = netcat
a1.sources.s1.bind = localhost
a1.sources.s1.port = 10050
a