安装

修改etc/hadoop下面的配置
获取JAVA_HOME位置

echo $JAVA_HOME

​hadoop-env.sh​

#export JAVA_HOME=${JAVA_HOME}
export JAVA_HOME=/root/jdk1.8.0_151

core-site.xml

<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://www.erlie.cc:8020</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/root/hadoop-2.6.0/tmp</value>
</property>
</configuration>

hdfs-site.xml

<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>

bin目录格式化

./hdfs namenode -format

sbin目录启动

./start-dfs.sh

参考博客

windows下安装hadoop