라이브러리/시스템
Flume 1.4 설치 (Ubuntu 14.04 server)
눌프
2014. 8. 7. 18:05
Download
- wget http://ftp.daum.net/apache/flume/1.4.0/apache-flume-1.4.0-bin.tar.gz
- tar zxvf apache-flume-1.4.0-bin.tar.gz
- sudo mv apache-flume-1.4.0-bin /usr/local/flume
- sudo chown -R hadoop:hadoop /usr/local/flume
Set Environment
- vi ~/.bashrc
- export FLUME_HOME=/usr/local/flume
- export PATH=$PATH:$FLUME_HOME/bin
- source ~/.bashrc
Flume Configuration
- cd $FLUME_HOME/conf
- cp flume-conf.properties.template flume.conf
- vi flume.conf
######################################################agent.sources = netcat_sourceagent.channels = memory_channelagent.sinks = file_sink######################################################agent.sources.netcat_source.type = netcatagent.sources.netcat_source.bind = 0.0.0.0agent.sources.netcat_source.port = 8888agent.sources.netcat_source.channels = memory_channel######################################################agent.channels.memory_channel.type = memoryagent.channels.memory_channel.capacity = 10000######################################################agent.sinks.file_sink.type = file_rollagent.sinks.file_sink.sink.directory = /tmp/flumeagent.sinks.file_sink.channel = memory_channelagent.sinks.file_sink.sink.rollInterval = 60agent.sinks.file_sink.batchSize = 10000
- touch /tmp/test.log
- mkdir /tmp/flume
- flume-ng agent --conf-file $FLUME_HOME/conf/flume.conf --name agent
- ls -al /tmp/flume
- telnet localhost 8888