在ubuntu 12.04上找不到start-dfs.sh:命令

时间:2015-09-01 17:21:22

标签: hadoop

我已经安装了hadoop 2.2.0。在Ubuntu 12.04上。但命令var $grid = $('.grid').masonry({ // disable initial layout isInitLayout: false, //... }); // bind event $grid.masonry( 'on', 'layoutComplete', function() { console.log('layout is complete'); }); // manually trigger initial layout $grid.masonry(); 无效。当我运行此命令时,它返回start-dfs.shstart-dfs.sh: command not foundstart-dfs.shstart-all.shstop-dfs.sh位于stop-all.sh目录中。可能是什么问题?

1 个答案:

答案 0 :(得分:2)

第一个解决方案

设置Hadoop环境变量

$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/

关闭文件并执行此命令

source .bashrc
start-all.sh

如果不能重新启动并尝试上面的命令

第二种解决方案

转到hadoop的sbin目录

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

注意 - 确保权限,所有者应该是正确的。