码迷,mamicode.com
首页 > Web开发 > 详细

flume-ng 集群搭脚本

时间:2016-02-04 00:20:02      阅读:182      评论:0      收藏:0      [点我收藏+]

标签:

#!/bin/bash

# author: xirong 
# date  :  2015-02-06 

#####  搭建 flume 集群的脚本
#    注意:
#   1. 需要 jdk7 环境,如果没有 Java 环境,请配置
#   2. 有 /home/work 目录,否则无法安装
#
####

# 压缩文件解压
tar -zxf apache-flume-1.5.2-bin.tar.gz -C /home/work/flume_cluster/

# 配置flume环境
echo ## flume configuration  >> /etc/profile
echo export FLUME_HOME=/home/work/flume_cluster/apache-flume-1.5.2-bin >> /etc/profile
echo export PATH=.:$PATH::$FLUME_HOME/bin >> /etc/profile

source /etc/profile

# 添加Java 环境变量
\cp -f $FLUME_HOME/conf/flume-env.sh.template $FLUME_HOME/conf/flume-env.sh
echo JAVA_HOME=/opt/jdk1.7.0_75/ >> $FLUME_HOME/conf/flume-env.sh

echo confgratulations! fluem has been installed and flume-env.sh has been set!

# 测试是否成功 
flume-ng version

## Flume 1.5.2
## Source code repository: https://git-wip-us.apache.org/repos/asf/flume.git
## Revision: 229442aa6835ee0faa17e3034bcab42754c460f5
## Compiled by hshreedharan on Wed Nov 12 12:51:22 PST 2014
## From source with checksum 837f81bd1e304a65fcaf8e5f692b3f18

 

flume-ng 集群搭脚本

标签:

原文地址:http://www.cnblogs.com/super-d2/p/5180790.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!