centos6.6安装hadoop-2.5.0(一、本地模式安装)

操作系统:centos6.6(一台服务器)

环境:selinux disabled;iptables off;java 1.8.0_131

安装包:hadoop-2.5.0.tar.gz

hadoop的本地模式部署(适用于本地开发调试模式)

1、新建安装目录

#mkdir /data/hadoop/hadoopstandalone -p

2、解压压缩包

#tar  zxvf  hadoop-2.5.0.tar.gz -C /data/hadoop/hadoopstandalone/

3、运行hadoop之前确保${JAVA_HOME}路径已添加环境变量

#${JAVA_HOME}

4、准备测试文件

#cat  /data/hadoop/hadoopstandalone/hadoop-2.5.0/wc.input

 

5、运行hadoop自带的mapreduce demo

#bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.5.0.jar wordcount wc.input output

#ll output/

_SUCCESS表示JOB运行成功

part-r-00000表示输出文件结果

在hadoop本地模式运行时,会看到LocalJobRunner的字样。

原文地址:https://www.cnblogs.com/qfdxxdr/p/8474109.html