Mac OS X 10.7.2下搭建hadoop1.0.3伪分布式模式

Linux大全评论176 views阅读模式

第一步:下载Hadoop1.0.3

在浏览器输入:http://apache.etoak.com/hadoop/common/hadoop-1.0.3/

选择hadoop-1.0.3.tar.gz

第二步:解压、配置环境变量

我将hadoop-1.0.3.tar.gz放置在了/Users/zhangosufei/software下。

利用命令:tar -zxvf hadoop-1.0.3.tar.gz解压,解压后的路径如下:

/Users/zhangosufei/software/hadoop-1.0.3

通过cd conf命令切换到conf,通过vi hadoop-env.sh,在此文件末尾输入一下命令:

  1. export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home   
  2. export HADOOP_INSTALL=/Users/zhangosufei/software/hadoop-1.0.3  
  3. export PATH=$PATH:$HADOOP_INSTALL/bin  

保存,退出。

注意:HADOOP_INSTALL根据你本地hadoop所放置的位置来设置。

第三步:配置hadoop

通过vi core-site.xml,编辑此文件如下:

  1. <?xml version="1.0"?>  
  2. <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>  
  3.   
  4. <!-- Put site-specific property overrides in this file. -->  
  5.   
  6. <configuration>  
  7.     <property>  
  8.         <name>fs.default.name</name>  
  9.         <value>hdfs://localhost:9000</value>  
  10.     </property>  
  11. </configuration>  
  1. <?xml version="1.0"?>  
  2. <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>  
  3.   
  4. <!-- Put site-specific property overrides in this file. -->  
  5.   
  6. <configuration>  
  7.   <property>  
  8.     <name>mapred.job.tracker</name>  
  9.     <value>localhost:9001</value>  
  10.   </property>  
  11. </configuration>  
  1. <?xml version="1.0"?>  
  2. <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>  
  3.   
  4. <!-- Put site-specific property overrides in this file. -->  
  5.   
  6. <configuration>  
  7.   <property>  
  8.     <name>dfs.replication</name>  
  9.     <value>1</value>  
  10.   </property>  
  11. </configuration>  

企鹅博客
  • 本文由 发表于 2020年6月30日 05:21:36
  • 转载请务必保留本文链接:https://www.qieseo.com/152097.html

发表评论