hadoop start-dfs.sh Error: JAVA_HOME is not set and could not be found

执行 start-dfs.sh 报错如下

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 ~/.bashrc 添加内容

export JAVA_HOME=/usr/local/jdk1.8.0_141
export PATH=$PATH:$JAVA_HOME/bin
export HADOOP_PREFIX=/root/hadoop-3.0.0

然后重新启动

你可能感兴趣的:(hadoop,linux运维,hadoop)