Windows下Flume的安装

flume(日志收集系统)

Flume是Cloudera提供的一个高可用的,高可靠的,分布式的海量日志采集、聚合和传输的系统,Flume支持在日志系统中定制各类数据发送方,用于收集数据;同时,Flume提供对数据进行简单处理,并写到各种数据接受方(可定制)的能力。
 

1、安装JDK并配置环境变量
2、下载Flume并解压到F盘
3、进入到conf目录下
4、重命名文件
  把flume-conf.properties.template文件重命名为flume.conf
5、复制一下代码到flume.conf中覆盖

# 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 

6、在DOS中启动Flume

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

7、新打开一个DOS窗口,输入

telnet localhost 44444

进入输入框就可以开始发送消息了。

 

posted @ 2018-04-03 13:58  孤独青鸟  阅读(1651)  评论(0编辑  收藏  举报