Flume Installation

下載flume二進制安裝包:apache-flume-1.6.0-bin.tar.gzjava

http://www.apache.org/dist/flume/1.6.0/express

http://www.apache.org/dist/flume/1.7.0/apache

把apache-flume-1.6.0-bin.tar.gz文件存放在/opt/beh/core目錄下,進行解壓:app

tar -zxvf apache-flume-1.6.0-bin.tar.gzless

更名:jvm

mv apache-flume-1.6.0-bin flumeui

l  設置環境變量this

export FLUME_HOME=/opt/beh/core/flumespa

export PATH=$PATH:$ FLUME_HOME/binorm

l  配置參數文件

配置文件存放在$FLUME_HOME/conf/目錄下,將flume-env.sh.template文件名稱改成flume-env.sh

mv flume-env.sh.template flume-env.sh

配置內容以下:

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
 
# If this file is placed at FLUME_CONF_DIR/flume-env.sh, it will be sourced
# during Flume startup.
 
# Enviroment variables can be set here.
 
# export JAVA_HOME=/usr/lib/jvm/java-6-sun
 
# Give Flume more memory and pre-allocate, enable remote monitoring via JMX
 export JAVA_OPTS="-Xms1024m -Xmx4096m -Dcom.sun.management.jmxremote"
 
# Note that the Flume conf directory is always included in the classpath.
#FLUME_CLASSPATH=""

配置說明:

JAVA_OPTS設置flume啓動agent時JVM分配的最小內存和最大內存,根據機器配置儘可能設置大一點。

l  驗證是否安裝成功

    進入$FLUME_HOME/bin路徑下,執行:flume-ng version ,若是顯示版本號說明安裝成功。

相關文章
相關標籤/搜索