从无到有系列之flume-安装部署01
2016-11-17 17:29
218 查看
[align=left]1.下载flume并解压: wget 命令下载[/align]
wget http://www.apache.org/dyn/closer.cgi/flume/1.6.0/apache-flume-1.6.0-bin.tar.gz 手动下载: http://flume.apache.org/download.html
2.解压:tar zxf apache-flume-1.6.0-bin.tar.gz
[align=left](1)添加环境变量 gedit/etc/profile[/align]
[align=left]#forflume1.6.0[/align]
[align=left]exportFLUME_HOME=/home/hadoop/apache-flume-1.6.0-bin[/align]
[align=left]exportFLUME_CONF_DIR=$FLUME_HOME/conf[/align]
[align=left]exportPATH=$PATH:$FLUME_HOME/bin[/align]
(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
[align=left]exportJAVA_HOME=/home/hadoop/jdk1.7.0_75[/align]
[align=left]exportJAVA_OPTS="-Xms100m -Xmx2000m -Dcom.sun.management.jmxremote"[/align]
3.flume的测试(一)telnet运行控制台输出
在$FLUME_HOME/conf目录下修改flume-conf.properties.template文件,复制并改
名为flume-conf
[align=left]#example.conf: A single-node Flume configuration[/align]
# 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下运行
5.再打开一个终端,输入命令:telnet
localhost 44444,输入“hello world”
6.[b]再看另一个终端是否有信息hello world打印出来[/b]
[b]本文参考转载至:http://flume.apache.org/FlumeUserGuide.html http://f.dataguru.cn/thread-523804-1-1.html[/b]
wget http://www.apache.org/dyn/closer.cgi/flume/1.6.0/apache-flume-1.6.0-bin.tar.gz 手动下载: http://flume.apache.org/download.html
2.解压:tar zxf apache-flume-1.6.0-bin.tar.gz
[align=left](1)添加环境变量 gedit/etc/profile[/align]
[align=left]#forflume1.6.0[/align]
[align=left]exportFLUME_HOME=/home/hadoop/apache-flume-1.6.0-bin[/align]
[align=left]exportFLUME_CONF_DIR=$FLUME_HOME/conf[/align]
[align=left]exportPATH=$PATH:$FLUME_HOME/bin[/align]
(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
[align=left]exportJAVA_HOME=/home/hadoop/jdk1.7.0_75[/align]
[align=left]exportJAVA_OPTS="-Xms100m -Xmx2000m -Dcom.sun.management.jmxremote"[/align]
3.flume的测试(一)telnet运行控制台输出
在$FLUME_HOME/conf目录下修改flume-conf.properties.template文件,复制并改
名为flume-conf
[align=left]#example.conf: A single-node Flume configuration[/align]
# 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.[b]再看另一个终端是否有信息hello world打印出来[/b]
[b]本文参考转载至:http://flume.apache.org/FlumeUserGuide.html http://f.dataguru.cn/thread-523804-1-1.html[/b]
相关文章推荐
- 从无到有系列之zookeeper-安装部署01
- 从无到有系列之storm-安装部署01
- 从无到有系列之Hive-安装部署01
- 从无到有系列之spark-安装部署01
- 从无到有系列之HBase-安装部署01
- 从无到有系列之zeepelin-安装部署01
- 从无到有系列之kafka安装部署01
- 从无到有系列之flume-kafka整合01
- Lync Server 2010的部署系列_第六章 安装配置拓扑生成器、前端Server、前端池
- Wsus3.0系列之一:wsus3.0的安装与初步部署
- [jBPM系列]jBPM 4.3 Demo Setup的安装部署
- Hadoop系列之一:hadoop部署安装
- SCCM 2007 R3安装部署及配置——SCCM 系列之二
- SCOM 2007 R2详解系列之安装部署准备篇-上
- Lync Server 2010标准版系列PART5:安装部署
- SCOM 2007 R2详解系列之安装部署准备篇-下
- SCOM 2007 R2详解系列安装部署篇之服务器核心组件部署
- ocs 2007部署实验系列之一——安装ocs服务器
- 微软远程部署系列之一:RIS的安装
- sql mobile 系列-手机设备上安装部署SQL Server Mobile