Flume安装

Flume安装前置条件

  • Java Runtime Environment - Java 1.7 or later (JDK1.7以上)
  • Memory - Sufficient memory for configurations used by sources, channels or sinks(有足够的内存)
  • Disk Space - Sufficient disk space for configurations used by channels or sinks(有足够的磁盘)
  • Directory Permissions - Read/Write permissions for directories used by agent(拥有读写的权限)

安装jdk

  1. 下载jdk解压到~/app
  2. 将java配置系统环境变量中: # vim ~/.bash_profile
  3. source下让其配置生效
    source ~/.bash_profile
  4. 检测: java -version

安装Flume

  1. 下载解压到~/app,这里使用的是CDH5.7.0版本的,可以点击这里下载
  2. 配置Flume环境变量
    将java配置系统环境变量中:
    1
    2
    export FLUME_HOME=/Users/duanjiaxing/app/apache-flume-1.6.0-cdh5.7.0
    export PATH=$PATH:$FLUME_HOME/bin

source下让其配置生效

  1. 配置flume-env.sh
    1. 首先拷贝一份配置文件
      # cp $FLUME_HOME/conf/flume-env.sh.template $FLUME_HOME/conf/flume-env.sh
    2. 将JAVA_HOME配置Flume的配置文件中
      # vim $FLUME_HOME/conf/flume-env.sh
      写入如下配置,也就是JAVA_HOME
      export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home
  2. flume检测: # flume-ng version
-------------End Of This ArticleThank You For Reading-------------