环境:win7, 64 bit, JDK7
Download the stable version 2.2.0
http://mirrors.cnnic.cn/apache/hadoop/common/stable2/
-
Unzip hadoop-2.2.0.tar.gz to c:/hadoop
设置环境变量 HADOOP_HOME 和 PATH (%HADOOP_HOME%/bin)
修改%HADOOP_HOME%\etc\hadoop\hadoop-env.cmd中的JAVA_HOME为当前Java安装路径。
set JAVA_HOME="C:\Progra~1\Java\jdk1.7.0_51"
-
下载https://github.com/srccodes/hadoop-common-2.2.0-bin/archive/master.zip, 把bin下的东西拷贝到hadoop\bin文件夹下。
修改etc/hadoop下的配置文件:
core-site.xml
<property> <name>fs.defaultFS</name> <value>hdfs://localhost:9100</value> </property>
hdfs-site.xm
-
<property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>dfs.namenode.name.dir</name> <value>file:/hadoop/data/namenode</value> </property> <property> <name>dfs.datanode.data.dir</name> <value>file:/hadoop/data/datanode</value> </property>
yarn-site.xml
<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>
mapred-site.xml
<property> <name>mapreduce.framework.name</name> <value>yarn</value> </property>
-
CMD 运行 hadoop namenode -format
-
CMD 运行 sbin/start-all
-
查看是否安装
本文出自 “ZenMaster” 博客,请务必保留此出处http://nealfu.blog.51cto.com/8652301/1382736