hdfs: command not found hadoop2.8.5

Problem: When you execute hdfs dfs -ls /input, you encounter hdfs: command not found.
Prerequisite: hadoop-2.8.5 package is under /home/angel/app; ordinary users are angel.
Solution:
1. Add the environment variable
cd /home/angel/
vim.tiny /home/angel/.profile
at the end of the file:

export HADOOP_HOME=/app/hadoop-2.8.5/bin
export PATH=$JAVA_HOME/bin:$PATH

Insert picture description here
2. Activate the environment variable
source.profile
3. Test
hdfs
Insert picture description here
to solve this problem successfully!

Guess you like

Origin blog.csdn.net/qq_45059457/article/details/109154103