从无到有系列之flume-安装部署01
来源:互联网 发布:怪物猎人捏脸数据库女 编辑:程序博客网 时间:2024/05/21 07:08
1.下载flume并解压: wget 命令下载
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
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
在$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
在$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
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
a1.sources.r1.type = netcat
a1.sources.r1.bind = localhost
a1.sources.r1.port = 44444
#Describe the sink
a1.sinks.k1.type = logger
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
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下运行a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1
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
0 0
- 从无到有系列之flume-安装部署01
- 从无到有系列之Hive-安装部署01
- 从无到有系列之zookeeper-安装部署01
- 从无到有系列之HBase-安装部署01
- 从无到有系列之storm-安装部署01
- 从无到有系列之spark-安装部署01
- 从无到有系列之zeepelin-安装部署01
- 从无到有系列之flume-kafka整合01
- 从无到有系列之flume的source-channel-sink汇总03
- Flume安装部署
- Flume的安装部署
- Flume的安装部署
- flume安装部署
- 从无到有系列之HBase-入门操作02
- 从无到有系列之zeepelin-小试牛刀02
- 从无到有系列之kafka生产消费者demo02
- Flume环境搭建、安装、部署
- Flume安装及简单部署
- 图片上传和显示——上传图片——上传文件)==ZJ
- 清空KindEditor富文本编辑器里面的内容方法
- MVC中使用Ajax提交数据 Jquery Ajax方法传值到action
- 11G RAC 一节点宕机后修改监听相关配置使通过宕机节点VIP连接数据库的客户端可以连接
- 牛逼的OSQL----大数据导入
- 从无到有系列之flume-安装部署01
- mysql忘记密码怎么办?
- 权限设计与总结——用户,角色,权限
- Java中的类加载器概述
- 实现解耦-Spring.Net
- unity鼠标跟随实现(ITween)
- T4模板——一个神奇的代码生成器
- 代码设计工具——PowerDesigner
- Linux C编程--sizeof面试题选