Wednesday, 14 September 2016

FLUME INSTALLATION

  FLUME INSTALLATION

  My configuration is Apache Flume 1.6.0 on machine with Ubuntu 14.04 and Apache Hadoop 1.2.1 and location of Hadoop is /usr/local/Hadoop

Step 1: Download latest Flume release from Apache Website.

Step 2: Move/Copy it to the location you want to install, in my case it is “/usr/local/”.
              1.$cd Downloads/              2.$sudo cp apache-flume-1.6.0-bin.tar.gz /usr/local/

Step 3: Extract the tar file. Go to the copied folder, in my case it is “/usr/local/” , run the below   commands
          $ cd /usr/local
          $ sudo tar -xzvf apache-flume-1.6.0-bin.tar.gz

Step 4: Rename folder from “apache-flume-1.6.0-bin” to “flume” for simplicity.
          $ sudo mv apache-flume-1.6.0-bin flume

Step 5:  Update environments
           $ gedit ~/.bashrc
       Add Below Lines:
              export FLUME_HOME=/usr/local/flume
              export FLUME_CONF_DIR=$FLUME_HOME/conf
              export FLUME_CLASSPATH=$FLUME_CONF_DIR
              export PATH=$PATH:$FLUME_HOME/bin 

Step 6: Change owner to user and group, in my case it is user:hduser and group:hadoop
           $ sudo chown -R hduser:hadoop /usr/local/flume

Step 7: Rename “flume-env.sh.template” to “flume-env.sh” and write the below values.
       $ sudo mv /usr/local/flume/conf/flume-env.sh.template flume-env.sh
        $ gedit /usr/local/flume/conf/flume-env.sh

        Add below line(please use your installed java version)
           $JAVA_OPTS="-Xms500m -Xmx1000m -Dcom.sun.management.jmxremote"
            export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
      
  How to check java version:
     echo $JAVA_HOME

Step 8: Enter as hduser and run flume CLI: 
            $ flume-ng --help 

3 comments: