flume 安装 配置

1、下载http://flume.apache.org/download.html
2、tar -zxvf
3、修改环境变量
[root@CentOS ~]# vi /etc/profile
末尾加上
#flume
export  FLUME_HOME=你解压的目录
export  FLUME_CONF_DIR=$FLUME_HOME/conf
export  PATH=$PATH:$FLUME_HOME/bin

变量立马生效
[root@CentOS ~]# source /etc/profile
查看
[root@CentOS ~]# echo $PATH

拷贝 flume conf 目录下面的 文件,flume-conf.properties.template cp成 flume-site.properties

示例配置
# example.conf: A single-node Flume configuration

# Name the components on this agent
a1.sources = r1
a1.sinks = k1
a1.channels = c1

# Describe/configure the source
a1.sources.r1.type = netcat
a1.sources.r1.bind = localhost
a1.sources.r1.port = 44444

# Describe the sink
a1.sinks.k1.type = logger

# Use a channel which buffers events in memory
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

猜你喜欢

转载自mthxunlei.iteye.com/blog/1982731
今日推荐