W
e
l
c
o
m
e
: )

bash: hdfs: command not found...问题解决

bash: hdfs: command not found...

格式化Hadoop集群报:bash: hdfs: command not found...,出现这个问题检查你的hadoop的环境变量是否正确配置!

举例:

[root@node1 ~]# vi .bash_profile 

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs
JAVA_HOME=/usr/java/jdk1.8.0_211-amd64
HADOOP_HOME=/opt/bigdata/hadoop-3.1.2

PATH=$PATH:$HOME/bin:$JAVA_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin

export JAVA_HOME
export HADOOP_HOME
export PATH
~                                                                                                                                                                                                       
:wq!

如若不行,请留言,共同学习,谢谢

posted @ 2020-04-28 14:44  水一RAR  阅读(3751)  评论(0编辑  收藏  举报