1.安裝jdk。html
2.下載解壓flume,修改bin/netcat-memory-logger.conf,內容以下:shell
agent1.sources = sources1 agent1.channels = channels1 agent1.sinks = sinks1 agent1.sources.sources1.type = netcat agent1.sources.sources1.bind = localhost agent1.sources.sources1.port = 44444 agent1.channels.channels1.type = memory agent1.channels.channels1.capacity = 1000 agent1.channels.channels1.transactionCapacity = 100 agent1.sinks.sinks1.type = logger agent1.sources.sources1.channels = channels1 agent1.sinks.sinks1.channel = channels1
3.啓動flume-ng架構
bin/flume-ng agent --conf conf --conf-file bin/netcat-memory-logger.conf --name agent1 -Dflume.root.logger=INFO,console
4.而後再開一個 shell 終端窗口,telnet 上配置中偵聽的端口,就能夠發消息看到效果了,Flume 終端窗口此時會打印出信息,就表示成功了。ui
參考:.net
Flume NG 簡介及配置實戰架構設計