Hadoop2.7.5在Windows下安装
2018-06-24 本文已影响3人
playman
下载安装
配置文件修改
运行
下载安装
环境变量配置
HADOOP_HOME
F:\worksoft\hadoop-2.7.5
PATH
%HADOOP_HOME%\bin
HADOOP_CONF_DIR
%HADOOP_HOME%\etc\hadoop
文件配置
- core-site.xml
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
- mapred-site.xml
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>
- hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>/hadoop/data/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>/hadoop/data/datanode</value>
</property>
</configuration>
- yarn-site.xml
<configuration>
<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-env.cmd 修改JDK路径
set JAVA_HOME=F:\worksoft\java\jdk1.8
启动
- 格式化HDFS文件系统
hdfs namenode -format
- 启动(sbin目录)
start-all
- 关闭(sbin目录)
stop-all
- 访问
localhost:8088
localhost:50070