[root@localhost hadoop-0.20.2]# start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-mapred.sh
starting namenode, logging to /home/chenwq/hadoop/hadoop-0.21.0/bin/../logs/hadoop-root-namenode-ubuntu.out
localhost: Error: JAVA_HOME is not set.
localhost: Error: JAVA_HOME is not set.
starting jobtracker, logging to /home/chenwq/hadoop/hadoop-0.21.0/bin/../logs/hadoop-root-jobtracker-ubuntu.out
localhost: Error: JAVA_HOME is not set.
解决方法:
编辑 conf/hadoop-env.sh
把 JAVA_HOME 设置为 java 安装的根路径
JAVA_HOME=/home/jdk/jdk1.6.0_16 # 这里需要根据自己的安装路径来写