设为首页 加入收藏

TOP

从无到有系列之flume-安装部署01
2018-11-13 16:14:28 】 浏览:84
Tags:从无到有 系列 flume- 安装 部署
1.下载flume并解压: wget 命令下载
手动下载: http://flume.apache.org/download.html

2.解压:tar zxf apache-flume-1.6.0-bin.tar.gz
(1)添加环境变量 gedit/etc/profile
#forflume1.6.0
exportFLUME_HOME=/home/hadoop/apache-flume-1.6.0-bin
exportFLUME_CONF_DIR=$FLUME_HOME/conf
exportPATH=$PATH:$FLUME_HOME/bin
(2)配置flume-env.sh文件
$FLUME_HOME/conf 下复制改名flume-env.sh.template为flume-env.sh
cp flume-env.sh.template flume-env.sh

(3)修改JAVA_HOME和JAVA_OPTS
exportJAVA_HOME=/home/hadoop/jdk1.7.0_75
exportJAVA_OPTS="-Xms100m -Xmx2000m -Dcom.sun.management.jmxremote"
3.flume的测试(一)telnet运行控制台输出
$FLUME_HOME/conf目录下修改flume-conf.properties.template文件,复制并改 名为flume-conf

#example.conf: A single-node Flume configuration
# Namethe 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 achannel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100
# Bindthe source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1
4.flume的安装目录/apache-flume-1.6.0-bin下运行
bin/flume-ng agent --conf conf --conf-file example.conf --name a1 -Dflume.root.logger=INFO,console

5.再打开一个终端,输入命令:telnet localhost 44444,输入“hello world”

6.再看另一个终端是否有信息hello world打印出来



本文参考转载至:http://flume.apache.org/FlumeUserGuide.html http://f.dataguru.cn/thread-523804-1-1.html

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Flume 1.7.0 新特性 - Taildir So.. 下一篇Flume的安装配置及使用案例

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目