anchor.diff:  export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
   ```
   
  -
  -然后，参考
  -https://flume.apache.org/FlumeUserGuide.html
  -进行更深入的了解。这里有一个例子：
  -```
  -bin/flume-ng agent --conf conf --conf-file example.conf --name a1 -Dflume.root.logger=INFO,console
  +运行flume-ng测试：
  +```
  +nu@node:~$ flume-ng --help
  +```
  +
  +=== *简单示例
  +
  +点击 https://flume.apache.org/FlumeUserGuide.html
  +进行更深入的了解。
  +
  +===== 示例1
  +```
  +nu@node:/usr/lib/flume/apache-flume-1.6.0-bin/conf$ vi example.conf
  +```
  +把下面的内容添加进去：
  +```
  +# example.conf: A single-node Flume configuration
  +
  +# Name the components on this agent
  +a1.sources = r1
  +a1.sinks = k1
  +a1.channels = c1
  +
  +# Describe/configure the source
  +a1.sources.r1.type = netcat
  +a1.sources.r1.bind = localhost
  +a1.sources.r1.port = 44444
  +
  +# Describe the sink
  +a1.sinks.k1.type = logger
  +
  +# Use a channel which buffers events in memory
  +a1.channels.c1.type = memory
  +a1.channels.c1.capacity = 1000
  +a1.channels.c1.transactionCapacity = 100
  +
  +# Bind the source and sink to the channel
  +a1.sources.r1.channels = c1
  +a1.sinks.k1.channel = c1
  +```
  +
  +
  +```
  +nu@node:~$ cd /usr/lib/flume/apache-flume-1.6.0-bin
  +nu@node:/usr/lib/flume/apache-flume-1.6.0-bin$ flume-ng agent --conf conf --conf-file conf/example.conf --name a1 -Dflume.root.logger=INFO,console
  +```
  +
  +这里，如果你是按照 https://flume.apache.org/FlumeUserGuide.html 的指导，用下面的命令：
  +
  +```
  +nu@node:/usr/lib/flume/apache-flume-1.6.0-bin$ bin/flume-ng agent --conf conf --conf-file example.conf --name a1 -Dflume.root.logger=INFO,console
   ```
   如果你在flume conf目录下运行这个命令，他会提示错误：
   ```
  
positive.code: ```
  bin/flume-ng agent --conf conf --conf-file conf/example.conf --name a1 -Dflume.root.logger=INFO,console
  ```
  然后继续follow的 https://flume.apache.org/FlumeUserGuide.html 上面的指导就可以了。
  
  
  == 第三方插件
  
  插件目录可以加到flume-env.sh中的FLUME_CLASSPATH，或者直接把插件装到plugins.d目录下面。
  每个插件目录可以有三个子目录: lib, libext, native
  
negative.code: 添加到~/.bashrc
  ```
  ### Flume Home Directory
  export FLUME_HOME="/usr/lib/flume/apache-flume-1.6.0-bin"
  export FLUME_CONF_DIR="$FLUME_HOME/conf"
  export FLUME_CLASSPATH="$FLUME_CONF_DIR"
  export PATH="$FLUME_HOME/bin:$PATH"
  ### Flume Home Directory end
  ```
  
  