window下安装flume

Posted 陈晓婵

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了window下安装flume相关的知识,希望对你有一定的参考价值。

本教程是在已经安装了jdk1.8以后的基础上进行的操作. 1.登陆官网http://flume.apache.org/download.html下载apache-flume-1.8.0-bin.tar.gz 2.解压apache-flume-1.8.0-bin.tar.gz 3.在conf文件夹中新建example.conf文件 # example.conf: A single-node Flume 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.打开cmd进入到apache-flume-1.6.0-bin\\bin目录下,运行如下命令 flume-ng.cmd agent -conf ../conf -conf-file ../conf/example.conf -name a1 -property flume.root.logger=INFO,console
5.在另一个cmd窗口中,输入telnet 44444,如果连接成功,将会进入可输入状态,输入任何字符,可以在第一个cmd的窗口中看到输入的内容.

其实在windows安装flume是很简单的,但是在安装的时候,遇到了下面的问题: 处理 -File“E:\\Program”失败,因为该文件不具有 '.ps1' 扩展名。请指定一个有效的 Windows PowerShell 脚本文件名,然后重试。 解决方法: 将flume的安装包放到磁盘的根目录下.
最后:如果telnet服务不能使用,使用https://jingyan.baidu.com/article/870c6fc3cd6fa9b03fe4bee4.html去开启telnet服务.

以上是关于window下安装flume的主要内容,如果未能解决你的问题,请参考以下文章

flume 1.7在windows下的安装与运行

关于如何在 Windows 中使用 hadoop 安装水槽的任何想法?

flume安装

大数据软件安装之Flume(日志采集)

Flume的安装与使用

flume