设为首页 加入收藏

TOP

Linux安装配置Flume
2018-11-28 17:44:37 】 浏览:27
Tags:Linux 安装 配置 Flume
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/mvpboss1004/article/details/52883194
1.安装flume
下载apache-flume-1.6.0-bin.tar.gz
tar -zxvf apache-flume-1.6.0-bin.tar.gz
mv apache-flume-1.6.0-bin/ /usr/share/apache-flume

2.设置环境变量
cd /usr/share/apache-flume
cp conf/flume-env.sh.template conf/flume-env.sh
vim conf/flume-env.sh,编辑:JAVA_HOME=/usr/java/jdk1.8.0_71

3.一个简单的单source、单sink例子
vim conf/s1k1.conf,编辑:
# s1k1.conf: A single-source and single-sink 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

4.测试
bin/flume-ng agent --conf conf --conf-file conf/s1k1.conf --name a1 -Dflume.root.logger=INFO,console
另开一个窗口,telnet 127.0.0.1 44444,在第一个窗口会有回显

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Alex 的 Hadoop 菜鸟教程: 第22课.. 下一篇日志采集系统flume和kafka有什么..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目