Skip to content
Advertisement

Starting hadoop – command not found

I have zero experience in hadoop and trying to set up hadoop in ec2 environment. After formatted the filesystem, I tried to start hadoop and it keeps saying command not found.

I think I have tried every advice I found on stackoverflow previous questions/answers.

Here is the line I am having trouble with:

[root@ip-172-31-22-92 ~]# start-hadoop.sh
-bash: start-hadoop.sh: command not found

I have tried all the following commands (which I found on previous answers)

[root@ip-172-31-22-92 ~]# hadoop-daemon.sh start namenode
-bash: hadoop-daemon.sh: command not found

[root@ip-172-31-22-92 ~]# ./start-all.sh
-bash: ./start-all.sh: No such file or directory

[root@ip-172-31-22-92 ~]# cd /usr/local/hadoop/
-bash: cd: /usr/local/hadoop/: No such file or directory

Honestly, I don’t know what I am doing wrong. Plus, I am doing this as root…is this right? it seems like I should be in user…?! (discard this question if i just sounded dumber)

Advertisement

Answer

I am not sure whether you have downloaded/installed the hadoop package or not, so let me walk you through the process of it briefly:

  1. Download the latest package using wget:

    wget http://apache.cs.utah.edu/hadoop/common/hadoop-2.7.1/hadoop-2.7.1.tar.gz
    
  2. Extract the package relative to where you have downloaded it:

    tar xzf hadoop-2.7.1.tar.gz
    
  3. change the dir into the extracted directory

    cd hadoop-2.7.1
    
  4. Now you would be able to find or start the hadoop daemons using:

    sbin/start-all.sh
    

You can find the script’s you are trying to use in the extracted dir’s (hadoop-2.7.1) sbin folder.

Make sure you follow the proper documentation to get it completed properly, because I haven’t really covered installing Java or configuring hadoop which are extensively covered in the following documentation link:

http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement