赞
踩
# sbin/start-dfs.sh 报错如下
[hadoop@vm7 hadoop-2.7.1]$ sbin/start-dfs.sh
Starting namenodes on [localhost]
localhost: Error: JAVA_HOME is not set and could not be found.
localhost: Error: JAVA_HOME is not set and could not be found.
# vim /home/hadoop/.bashrc 添加如下内容
export JAVA_HOME=/usr/local/jdk1.7.0_65
export PATH=$PATH:$JAVA_HOME/bin
export HADOOP_PREFIX=/home/hadoop/hadoop-2.7.1
再次启动
# sbin/start-dfs.sh
[hadoop@vm7 hadoop-2.7.1]$ sbin/start-dfs.sh
Starting namenodes on [localhost]
localhost: starting namenode, logging to /home/hadoop/hadoop-2.7.1/logs/hadoop-hadoop-namenode-vm7.0.out
localhost: starting datanode, logging to /home/hadoop/hadoop-2.7.1/logs/hadoop-hadoop-datanode-vm7.0.out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /home/hadoop/hadoop-2.7.1/logs/hadoop-hadoop-secondarynamenode-vm7.0.out
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。