Vilas D.
Vilas D.

Reputation: 175

start-dfs.sh: command not found on ubuntu 12.04

I have installed hadoop 2.2.0. on Ubuntu 12.04. But the command start-dfs.sh is not working. When I run this command it returns start-dfs.sh: command not found. start-dfs.sh, start-all.sh, stop-dfs.sh and stop-all.sh are in the sbin directory. What might be the problem?

Upvotes: 1

Views: 4414

Answers (1)

Kishore
Kishore

Reputation: 5881

first solution

Setup Hadoop Environment Variables

$cd ~
$vi .bashrc
 
paste following to the end of the file
 
#Hadoop variables
export JAVA_HOME=/usr/lib/jvm/jdk/
export HADOOP_INSTALL=/usr/local/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/local/hadoop/etc/hadoop
$ vi hadoop-env.sh
 
#modify JAVA_HOME
export JAVA_HOME=/usr/lib/jvm/jdk/

close the file and execute this command

source .bashrc
start-all.sh

if not work restart and try above command

second solution

go to sbin directory of hadoop

cd /home/kishore/hadoop/sbin
  ./start-all.sh

Note- make sure about permission and owner should be right.

Upvotes: 2

Related Questions