3piecechickendinner
3piecechickendinner

Reputation: 43

Received, Hadoop command not found

I am very new to Hadoop and try to install on my Mac OS X and when I run the command hadoop version in the terminal i get the message of hadoop command not found. Ive searched the help files here but am still having issues..

Below is my .bashrc file which i found a copy on the web

# Set Hadoop-related environment variables
export HADOOP_HOME=/usr/bin/hadoop

# Set JAVA_HOME
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
# Add Hadoop bin/ directory to PATH
export PATH=$PATH:$HADOOP_HOME/bin

and this is from my hadoop-env.sh file for the java location

# The java implementation to use.
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home

My installation of hadoop is located in /usr/bin/hadoop

Upvotes: 2

Views: 2117

Answers (1)

Kishore
Kishore

Reputation: 5891

$cd ~
$vi .bashrc

paste following to the end of the file

#Hadoop variables
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk
export HADOOP_INSTALL=/usr/bin/hadoop
export PATH=$PATH:$HADOOP_INSTALL/bin
export PATH=$PATH:$HADOOP_INSTALL/sbin
export HADOOP_MAPRED_HOME=$HADOOP_INSTALL
export HADOOP_COMMON_HOME=$HADOOP_INSTALL
export HADOOP_HDFS_HOME=$HADOOP_INSTALL
export YARN_HOME=$HADOOP_INSTALL
###end of paste

$ cd /usr/bin/hadoop/etc/hadoop
$ vi hadoop-env.sh

#modify JAVA_HOME
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/

more detail- http://codesfusion.blogspot.in/2013/10/setup-hadoop-2x-220-on-ubuntu.html

Upvotes: 1

Related Questions