一、安装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