Skip to main content

windows 安装 hadoop

下载:

https://github.com/steveloughran/winutils

http://archive.apache.org/dist/hadoop/core/

配置etc/hadoop里面的5个文件:

core-site.xml

<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>

hdfs-site.xml

<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>/F:/hadoop-2.10.2/data/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>/F:/hadoop-2.10.2/data/datanode</value>
</property>
</configuration>

mapred-site.xml

<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>

yarn-site.xml

<configuration>

<!-- Site specific YARN configuration properties -->
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>

</configuration>

hadoop\hadoop-env.cmd

set JAVA_HOME=C:\PROGRA~1\Java\jdk1.8.0_261

PROGRA~1 替代了 Program Files

启动

命令行执行

hdfs namenode -format 或 hadoop namenode -format

sbin目录下执行: stop-all.cmd

打开

http://localhost:50070

http://localhost:8088/cluster