第四次实验:树莓派下安装flume-1.6.0
抽空装了一下w
1、下载安装apache flume
1 2 3 4 5 | sudo wget http://mirror.bit.edu.cn/apache/flume/1.6.0/apache-flume-1.6.0-bin.tar.gz sudo tar -zxvf apache-flume-1.6.0-bin.tar.gz sudo mv apache-flume-1.6.0-bin flume |
设置环境变量
1 | sudo nano /etc/profile |
加入如下内容
1 | FLUME_HOME=/mnt/study/flume |
在PATH后加入
1 | :$FLUME_HOME/bin |
修改配置文件
1 2 3 | cd flume/conf sudo cp flume-conf.properties.template simple.conf |
修改为以下内容
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | agent.sources = s1 agent.channels = c1 agent.sinks = sk1 # For each one of the sources, the type is defined agent.sources.s1.type = netcat a1.sources.s1.bind = localhost a1.sources.s1.port = 95270 # The channel can be defined as follows. agent.sources.s1.channels = c1 # Each sink's type must be defined agent.sinks.sk1.type = logger #Specify the channel the sink should use agent.sinks.sk1.channel = c1 # Each channel's type is defined. agent.channels.c1.type = memory # Other config values specific to each type of channel(sink or source) # can be defined as well # In this case, it specifies the capacity of the memory channel agent.channels.c1.capacity = 1000 a1.channels.c1.transactionCapacity = 100 # Bind the source and sink to the channel a1.sources.s1.channels = c1 a1.sinks.sk1.channel = c1 |
2、启动agent
1 2 3 | source /etc/profile /mnt/study/flume/conf$ flume-ng agent --conf conf --conf-file simple.conf --name a1 -Dflume.root.logger=INFO,console |
利用flume-ng命令查看版本号
1 | /mnt/study/flume/conf$ <b> </b>flume-ng version |
1 2 3 4 5 6 7 8 9 | Flume 1.6.0 Source code repository: https://git-wip-us.apache.org/repos/asf/flume.git Revision: 2561a23240a71ba20bf288c7c2cda88f443c2080 Compiled by hshreedharan on Mon May 11 11:15:44 PDT 2015 From source with checksum b29e416802ce9ece3269d34233baf43f |
参考文献:
码字很辛苦,转载请注明来自空间中的空间的《第四次实验:树莓派下安装flume-1.6.0》
2016-01-08
和谐小本子·BD
评论