HDFS Basics - Error installing Hadoop

Error: Cannot find configuration directory: /etc/hadoop

[ Error ] When installing Hadoop2.7.1, use the command start-all.sh to start, and the Error: Cannot find configuration directory: /etc/hadoop error appears:

Error: Cannot find configuration directory: /etc/hadoop
starting yarn daemons
Error: Cannot find configuration directory: /etc/hadoop

[ Solution ] Open the hadoop-env.sh file

cd /usr/hadoop/hadoop/etc/hadoop 
<!-- /usr/hadoop/hadoop是Hadoop安装目录 -->

vim hadoop-env.sh

Find the line export HADOOP_CONF_DIR={...} and reset it according to your own installation path. Modify the content

export HADOOP_CONF_DIR=/home/hadoop-2.7.0/etc/hadoop/
<!-- /usr/hadoop/hadoop是Hadoop安装目录 -->

:wq! Save the file and exit vim to update the data

source  hadoop-env.sh

If the linux computer name is not localhost, there will also be a problem

As shown below:

vim open /etc/host and edit the contents of the file

vim /etc/hosts

 127.0.0.1 can be solved by adding the local name after the line

127.0.0.1 localhost 本机名称
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

Guess you like

Origin blog.csdn.net/weixin_46899412/article/details/123384489