1. If you have not installed a Java environment, you will need to install the JDK first.
Installation of the JDK section in the build environment of the Kafka operating environment on Windows
2. Official Download flume (currently apache-flume-1.8.0-bin.tar.gz)
Official
Official User manual
3. According to the official user manual, create a simple example to monitor the input of the 44444 port and output it in the console.
① Create a example.conf file into the apache-flume-1.8.0-bin\conf folder.
# example.conf:a single-node Flume configuration# Name The components in this agenta1.sources=r1a1.sinks=K1a1.channels=c1# Describe/Configure the Sourcea1.sources.r1.type=Netcata1.sources.r1.bind=Localhosta1.sources.r1.port=44444# Describe The Sinka1.sinks.k1.type=logger# use a channelwhichBuffers EventsinchMemorya1.channels.c1.type=memorya1.channels.c1.capacity= +a1.channels.c1.transactionCapacity= -# Bind The source and sink to the Channela1.sources.r1.channels=C1a1.sinks.k1.channel= C1
② use cmd to enter Apache-flume-1.8.0-bin/bin, run the command below to start Flume.
Flume-ng Agent--conf. /conf--conf-file : /conf/example.conf--name A1-property Flume.root.logger=info,console
At the end of the console can see the following port listening prompt indicates that the flume process started normally.
③ start another cmd, connect to port 44444 using Telnet and send a message Hello world!
44444
④ can see the following tips in the Flume console
Above.
Build flume running Environment on Windows