Flume 1.7.0單機版安裝

來源:互聯網
上載者:User

標籤:events   技術分享   lib   mem   localhost   ons   amd   san   connected   

下載解壓到/usr/local/flume

配置環境變數

export FLUME_HOME=/usr/local/flumeexport FLUME_CONF_DIR=$FLUME_HOME/confexport PATH=.:$PATH::$FLUME_HOME/bin

在conf裡配置flume-env.sh  添加jdk路徑

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

 

flume-ng version

驗證是否安裝成功

[email protected]:~# flume-ng versionFlume 1.7.0Source code repository: https://git-wip-us.apache.org/repos/asf/flume.gitRevision: 511d868555dd4d16e6ce4fedc72c2d1454546707Compiled by bessbd on Wed Oct 12 20:51:10 CEST 2016From source with checksum 0d21b3ffdc55a07e1d08875872c00523
View Code

 

ps:如果報這錯java.lang.ClassNotFoundException: org.apache.flume.tools.GetJavaProperty

就將hbase的hbase.env.sh的一行配置注釋掉

#export HBASE_CLASSPATH=/xxx在conf裡建立single-node.conf
# example.conf: A single-node Flume configuration# Name the components on this agenta1.sources = r1a1.sinks = k1a1.channels = c1# Describe/configure the sourcea1.sources.r1.type = netcata1.sources.r1.bind = localhosta1.sources.r1.port = 44444# Describe the sinka1.sinks.k1.type = logger# Use a channel which buffers events in memorya1.channels.c1.type = memorya1.channels.c1.capacity = 1000a1.channels.c1.transactionCapacity = 100# Bind the source and sink to the channela1.sources.r1.channels = c1a1.sinks.k1.channel = c1
View Code

運行

bin/flume-ng agent --conf conf --conf-file conf/single-node.conf --name a1 -Dflume.root.logger=INFO,console

另外開啟一個終端

telnet 127.0.0.1 44444
Trying 127.0.0.1...Connected to 127.0.0.1.Escape character is ‘^]‘.
View Code

然後在這邊隨便輸入內容,再去原來的終端觀察

    

 

Flume 1.7.0單機版安裝

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.