一、安裝JDK並配置環境變量
二、下載Flume並解壓到F盤
三、進入到conf目錄下
四、重命名文件
把flume-conf.properties.template文件重命名爲flume.conf
五、複製一下代碼到flume.conf中覆蓋python
# Name the components on this agent a1.sources = r1 a1.sinks = k1 a1.channels = c1 # source a1.sources.r1.type = netcat a1.sources.r1.bind = localhost a1.sources.r1.port = 44444 # sink a1.sinks.k1.type = logger # channel a1.channels.c1.type = memory a1.channels.c1.capacity = 1000 a1.channels.c1.transactionCapacity = 100 # Bind the source and sink to the channel a1.sources.r1.channels = c1 a1.sinks.k1.channel = c1
六、在DOS中啓動Flumeapache
cd F:\apache-flume-1.8.0-bin\apache-flume-1.8.0-bin\bin flume-ng.cmd agent -conf-file ../conf/flume.conf -name a1 -property flume.root.logger=IN
七、新打開一個DOS窗口,輸入分佈式
telnet localhost 44444
進入輸入框就能夠開始發送消息了。this