Download unzip to/usr/local/Flume
Configuring Environment variables
Export flume_home=/usr/local/flumeexport flume_conf_dir= $FLUME _home/confexport PATH=.: $PATH:: $ Flume_home/bin
Configure flume-env.sh to add JDK paths in conf
Export JAVA_HOME=/USR/LIB/JVM/JAVA-8-OPENJDK-AMD64
Flume-ng version
Verify that the installation is successful
[Email protected]:~# flume-ng versionflume 1.7. 0Source code Repository:https:// git-wip-us.apache.org/repos/asf/20:51:10 cest fromsource with checksum 0d21b3ffdc55a07e1d08875872c00523
View Code
PS: If you report this mistake Java.lang.ClassNotFoundException:org.apache.flume.tools.GetJavaProperty
Comment out the line configuration for the hbase.env.sh of HBase
#export hbase_classpath=/xxxCreate single-node.conf in conf
#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 channel which buffers events in memoryA1.channels.c1.type =memorya1.channels.c1.capacity= 1000a1.channels.c1.transactionCapacity= 100#Bind the source and sink to the channelA1.sources.r1.channels =C1a1.sinks.k1.channel= C1
View Code
Run
Bin/flume-ng agent--conf conf--conf-file conf/single-node.conf--name A1-dflume.root.logger=info,console
Also open a terminal
Telnet 127.0.0.1 44444
Trying 127.0.0.1127.0.0.1is'^]'.
View Code
Then enter the content here, then go to the original terminal to observe
Flume 1.7.0 stand-alone version installation