1.下载
1、Windows版本的Hadoop:
Hadoop下载http://archive.apache/dist/hadoop/core/
winutils下载:https://github/steveloughran/winutils
2、解压到无中文无空格的目录的路径下
3、Windows配置环境变量:
HADOOP_HOME: hadoop的路径
在path中添加:
%HADOOP_HOME%\bin
%HADOOP_HOME%\ sbin
4、hadoop下创建两个文件夹:datanode、namenode
5、将bin目录下的Hadoop.dll文件复制到系统盘下:C:\windows\System32
6、添加配置
// core-site.xml
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
// hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>/D:/hadoop-3.0.0/data/namenode</value>
</property>
<property>
<name>fs.checkpoint.dir</name>
<value>/D:/hadoop-3.0.0/data/snn</value>
</property>
<property>
<name>fs.checkpoint.edits.dir</name>
<value>/D:/hadoop-3.0.0/data/snn</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>/D:/hadoop-3.0.0/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.auxservices.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
</configuration>
7、重起Windows系统
或格式化生效
hdfs namenode -format
8、启动
start-all
1.下载
1、Windows版本的Hadoop:
Hadoop下载http://archive.apache/dist/hadoop/core/
winutils下载:https://github/steveloughran/winutils
2、解压到无中文无空格的目录的路径下
3、Windows配置环境变量:
HADOOP_HOME: hadoop的路径
在path中添加:
%HADOOP_HOME%\bin
%HADOOP_HOME%\ sbin
4、hadoop下创建两个文件夹:datanode、namenode
5、将bin目录下的Hadoop.dll文件复制到系统盘下:C:\windows\System32
6、添加配置
// core-site.xml
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
// hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>/D:/hadoop-3.0.0/data/namenode</value>
</property>
<property>
<name>fs.checkpoint.dir</name>
<value>/D:/hadoop-3.0.0/data/snn</value>
</property>
<property>
<name>fs.checkpoint.edits.dir</name>
<value>/D:/hadoop-3.0.0/data/snn</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>/D:/hadoop-3.0.0/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.auxservices.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
</configuration>
7、重起Windows系统
或格式化生效
hdfs namenode -format
8、启动
start-all