الأربعاء، 3 يونيو 2015

Hadoop installation .. Standalone Mode

Hadoop should be installed in linux based system .. it cannot be installed in windows !!

Here i will write down the installation steps i have been done on Ubuntu 14.04 LTS .

you need to install Java before starting installing Hadoop .. you can follow the following link to install Java Wiki How .

i prefer to create separate user for Hadoop .

Open the terminal and do the following steps to install hadoop in ur linux OS .


  1. creating hadoop user :
    a- create the user by the following command :
    > sudo useradd hadoop
    > sudo passwd hadoop
    write the password and confirm password .
  2. SSH key generation "ensure you have install sshd ,sshd you can run > which ssh and you will get /usr/bin/ssh , /usr/bin/sshd if you have install them properly if not you can run > sudo apt-get install ssh to install them   ":
    a- run the following command to generate the rsa key :
             > ssh-keygen -t rsa
    b- you will be asked about the location of storing this key "i.e. ~/.ssh/authorized_keys "
    c- then give read and write permission for the owner :
              > chmod 0600 ~/.ssh/authorized_keys 

  3. Download Hadoop :
    a- Go to apache Hadoop home page
    b- Go to Download page
    c-In download page you will find a link to the releases of Hadoop click on the release you want to install it " the binary package".. it will redirect you to the mirror links page select any link and use it in the following command to download it :
    > sudo wget [ your link "i.e. http://apache.arvixe.com/hadoop/common/hadoop-2.6.0/hadoop-2.6.0.tar.gz "]
  4. extract the file to /usr/local directory :
    a- copy the downloaded file to /usr/local directory
    b- extract the file by this command 'sudo tar xzf hadoop-.tar.gz'
    c- rename the extracted file from hadoop. to be hadoop :
    > sudo mv hadoop-2.6.0 hadoop
    Note :
    if you got the following error :
       gzip: stdin: not in gzip format
       tar: Child returned status 1
       tar: Error is not recoverable: exiting now

    this mean the download or the copy is not done correctly so redownload the binary file and copy it in /usr/local properly .
  5. Define Hadoop in your path environmental variable :
    a- add the following line at the end of the '/.bashrc ' file :
    export PATH=$PATH:/usr/local/hadoop/bin/
  6. At this point the installation should be done .. you can check it by running the following command : > hadoop version
    you should got something like :
    hadoop version
    Hadoop 2.6.0
    Subversion https://git-wip-us.apache.org/repos/asf/hadoop.git -r e3496499ecb8d220fba99dc5ed4c99c8f9e33bb1
    Compiled by jenkins on 2014-11-13T21:10Z
    Compiled with protoc 2.5.0
    From source with checksum 18e43357c8f927c0695f1e9522859d6a
    This command was run using /usr/local/hadoop/share/hadoop/common/hadoop-common-2.6.0.jar
references :

1. http://www.tutorialspoint.com/hadoop/hadoop_enviornment_setup.htm

       



ليست هناك تعليقات:

إرسال تعليق