Flume installation and configuration, and flume installation Configuration

Source: Internet
Author: User

Flume installation and configuration, and flume installation Configuration
FlumeInstallation and configuration

0. Follow jdk.

Download the jdk-1.8.0 and apache-flume Binary packages
Set the software path as follows:
Jdk: // usr/local/jdk-1.8.0

1. Configure flume-env.sh

Cd/opt/apache-flume-1.8.0/confcp flume-env.sh.template flume-env.sh // point to JAVAecho "export JAVA_HOME =/usr/local/jdk1.8.0 _ 162/"> flume-env.sh

2. Edit the configuration file (vim default. conf)

# Set the loglog of the Configuration group. sinks = sklog. sources = sclog. channels = ch # configure sourceslog. sources. SC. type = exec # source type: command log. sources. SC. command = tail-F/data/log/access. log # configure sinkslog. sinks. sk. type = org. apache. flume. sink. kafka. kafkaSinklog. sinks. sk. kafka. topic = testlog. sinks. sk. kafka. bootstrap. servers = localhost: 9092 # configure channels. Record checkpointlog. channels. ch. type = file log. channels. ch. checkpointDir =/data/flume/checklog. channels. ch. dataDirs =/data/flume/data # bind source and sink to channlelog. sinks. sk. channel = chlog. sources. SC. channel = ch

3. Start flume

cd /opt/apache-flume-1.8.0bin/flume-ng agent --conf conf --conf-file conf/default.conf -name log

4. Start kafka and listen for output data

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.