1. 程式人生 > >Flume1.8安裝配置與入門例項

Flume1.8安裝配置與入門例項

一  下載Flume

1.1 下載並且安裝

下載地址

è¿éåå¾çæè¿°

選擇下載

當然大家也可以使用稍微老一點的版本1.7版本

把flume安裝包上傳到叢集並且進行解壓操作

資料夾改名

mv apache-flume-1.7.0-bin/  flume1.7.0/

檢視目錄結構

修改配置檔案

 mv flume-env.sh.template flume-env.sh

具體修改內容

# Enviroment variables can be set here. export JAVA_HOME=/opt/jdk1.8.0_112

# Give Flume more memory and pre-allocate, enable remote monitoring via JMX export JAVA_OPTS="-Xms100m -Xmx2000m -Dcom.sun.management.jmxremote"

修改flume-conf.properties

[[email protected] conf]# cp flume-conf.properties.template flume-conf.properties

檢視引數

[[email protected] flume-1.8.0]# bin/flume-ng Error: Unknown or unspecified command ''

Usage: bin/flume-ng <command> [options]...

commands:   help                      display this help text   agent                     run a Flume agent   avro-client               run an avro Flume client   version                   show Flume version info

global options:   --conf,-c <conf>          use configs in <conf> directory   --classpath,-C <cp>       append to the classpath   --dryrun,-d               do not actually start Flume, just print the command   --plugins-path <dirs>     colon-separated list of plugins.d directories. See the                             plugins.d section in the user guide for more details.                             Default: $FLUME_HOME/plugins.d   -Dproperty=value          sets a Java system property value   -Xproperty=value          sets a Java -X option

agent options:   --name,-n <name>          the name of this agent (required)   --conf-file,-f <file>     specify a config file (required if -z missing)   --zkConnString,-z <str>   specify the ZooKeeper connection to use (required if -f missing)   --zkBasePath,-p <path>    specify the base path in ZooKeeper for agent configs   --no-reload-conf          do not reload config file if changed   --help,-h                 display help text

avro-client options:   --rpcProps,-P <file>   RPC client properties file with server connection params   --host,-H <host>       hostname to which events will be sent   --port,-p <port>       port of the avro source   --dirname <dir>        directory to stream to avro source   --filename,-F <file>   text file to stream to avro source (default: std input)   --headerFile,-R <file> File containing event headers as key/value pairs on each new line   --help,-h              display help text

  Either --rpcProps or both --host and --port must be specified.

Note that if <conf> directory is specified, then it is always included first in the classpath.

檢視版本資訊

[[email protected] flume-1.8.0]# bin/flume-ng version Flume 1.8.0 Source code repository: https://git-wip-us.apache.org/repos/asf/flume.git Revision: 99f591994468633fc6f8701c5fc53e0214b6da4f Compiled by denes on Fri Sep 15 14:58:00 CEST 2017 From source with checksum fbb44c8c8fb63a49be0a59e27316833d [[email protected] flume-1.8.0]#

至此flume的配置就完全結束了!