开始配置环境变量

进入 /etc目录下面 修改profile 配置文件

  1. [root@zjj101 etc]# pwd
  2. /etc
  3. [root@zjj101 etc]# vim profile
  1. # 配置Flume 环境变量开始
  2. export FLUME_HOME=/root/soft/apache-flume-1.7.0
  3. export FLUME_CONF_DIR=$FLUME_HOME/conf
  4. export FLUME_LOG_DIR=$FLUME_HOME/log
  5. export PATH=$PATH:$FLUME_HOME/bin
  6. # 配置Flume 环境变量结束
  7. export PATH=$PATH:/root/soft/script
  8. export PATH

让环境变量刷新一下

如果不执行下面命令的话,你新配置的环境变量是不生效的

  1. [root@zjj101 etc]# source /etc/profile
  2. [root@zjj101 etc]#

测试Flume是否配置好环境变量

flume-ng version

已经生效,打印出版本号出来了.

  1. [root@zjj101 etc]# flume-ng version
  2. Flume 1.7.0
  3. Source code repository: https://git-wip-us.apache.org/repos/asf/flume.git
  4. Revision: 511d868555dd4d16e6ce4fedc72c2d1454546707
  5. Compiled by bessbd on Wed Oct 12 20:51:10 CEST 2016
  6. From source with checksum 0d21b3ffdc55a07e1d08875872c00523