Ubuntu下Hadoop伪分布式配置(Pseudo-Distributed Mode)

背景:

ubuntu-12.04
JDK 1.7
Hadoop 1.1.2

步骤:

1.解压

 把Hadoop的tar包拷贝到指定目录,使用tar -zxvf hadoop-version.tar.gz命令解压。

2.测试单点(本步骤可省略)

进入hadoop目录:
cd hadoop-1.1.2/
cp conf/*.xml input  
bin/hadoop jar hadoop-examples-1.1.2.jar grep input output 'dfs[a-z.]+'
cat output/*

3.伪分布式的配置

3.1在hadoop的conf/hadoop-env.sh中配置JAVA_HOME

3.2配置基本信息:

conf/core-site.xml:


     
         fs.default.name
         hdfs://localhost:9000
     


conf/hdfs-site.xml:


     
         dfs.replication
         1
     


conf/mapred-site.xml:


     
         mapred.job.tracker
         localhost:9001
     
3.3启动:

bin/hadoop namenode -format

bin/start-all.sh

4. Browse the web interface for the NameNode and the JobTracker; by default they are available at:

  • NameNode - http://localhost:50070/
  • JobTracker - http://localhost:50030/


你可能感兴趣的:(ubuntu,hadoop)