在VMWare Workstation8.0上使用ubuntu11安装和配置Hadoop群集环境03_hadoop的安装

2023-05-16

将hadoop-0.21.0.tar.gz通过SSH Secure File Transfer Client上传到usr目录下

1、修改/usr/hadoop-0.21.0/conf/目录下的master文件,内容如下:


192.168.1.61  

6、修改/usr/hadoop-0.21.0/conf/目录下的slaves文件,内容如下:  

192.168.1.62  

192.168.1.63  

7、修改/usr/hadoop-0.21.0/conf/hadoop-env.sh文件的环境变量:  

# The java implementation to use.  Required.
export JAVA_HOME=/usr/java/jdk1.6.0_20  

8、修改/usr/hadoop-0.21.0/conf/core-site.xml配置文件,内容如下:  

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
  <name>hadoop.tmp.dir</name>
  <value>/hadoopdata</value>
  <description>A base for other temporary directories.</description>
</property>

<property>
  <name>fs.default.name</name>
  <value>hdfs://radhat1:9000</value>
  <description>The name of the default file system.  A URI whose
  scheme and authority determine the FileSystem implementation.  The
  uri's scheme determines the config property (fs.SCHEME.impl) naming
  the FileSystem implementation class.  The uri's authority is used to
  determine the host, port, etc. for a filesystem.</description>
</property>

<property>
  <name>dfs.hosts.exclude</name>
  <value>excludes</value>
</property>
</configuration>  

9、修改/usr/hadoop-0.21.0/conf/hdfs-site.xml配置文件,内容如下:  

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->  

<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>  

10、修改/jz/hadoop-0.21.0/conf/mapred-site.xml配置文件,内容如下:  

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
  <name>mapred.job.tracker</name>
  <value>m131:9001</value>
  <description>The host and port that the MapReduce job tracker runs
  at.  If "local", then jobs are run in-process as a single map
  and reduce task.
  </description>
</property>
</configuration>  

11、修改ect/hosts配置文件,内容如下:  

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost
192.168.1.61 redhat1
192.168.1.62 redhat2
192.168.1.63 redhat3  

12、修改/ect/profile配置文件,在末尾追加以下内容,并输入source/etc/profile使之生效:  

export JAVA_HOME=/usr/java/jdk1.6.0_20

export JRE_HOME=/usr/java/jdk1.6.0_20/jre

export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH

export PATH=$JAVA_HOME/bin:$PATH

export HADOOP_HOME=/usr/hadoop-0.21.0  

export PATH=$HADOOP_HOME/bin:$PATH

export PATH=$PATH:$HIVE_HOME/bin  

13、将/usr/hadoop-0.21.0拷贝到192.168.1.62和192.168.1.63对应的目录下。将/ect/profile和/etc/hosts也拷贝到62和63机器上。注意profile需要做生效操作。  

三、启动/停止hadoop  

1、通过shell脚本启动hadoop。  

sh /usr/hadoop-0.21.0/bin/start-all.sh  

2、停止hadoop  

sh /usr/hadoop-0.21.0/bin/stop-all.sh  

或者  

 hdfs namenode -format  

 start-dfs.sh  

 start-mapred.sh  

四、初始配置

1、格式化HDFS文件系统。进入/usr/hadoop-0.21.0/bin目录。执行:


hadoop namenode –format  

2、在/jz/hadoop-0.21.0/bin目录下,执行:  

hadoop fs -ls /  

如果控制台返回结果,表示初始化成功。可以向里面录入数据。  

3、通过WEB查看hadoop  
查看集群状态http://192.168.1.61:50070/dfshealth.jsp
查看JOB状态http://192.168.1.61:50030/jobtracker.jsp

五、注意事项

1、hadoop的安装千万计的修改/etc/hosts文件。修改之后最好是重启机器。

2、master和slaves这2个配置文件可以不拷贝到redhat2和redhat3机器上,只在master上保存即可。

3、通过web查看hadoop的时候,如果使用IE一些图形工具显示不出来,建议使用opera或是chrome。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在VMWare Workstation8.0上使用ubuntu11安装和配置Hadoop群集环境03_hadoop的安装 的相关文章

随机推荐

  • 渐变色原理

    引用 http www islandcn com post 311 html 在图象图形的编程中 经常会见到渐变色以及各种图片的叠加等效果 这篇文章就是要对这些效果的原理加以分析 并在Elastos 操作系统 Mobile Edition
  • JAX-WS 学习二:创建客户端

    上一节中介绍了怎么基于JAX WS的API创建服务端 xff0c 这一节介绍一下创建一个客户端调用WebService服务 要创建一个Client端也相当简单 xff0c 不过需要知道几个东西 xff1a 1 wsdl文件路径 需要读取服务
  • 使用JDI监听Java程序运行

    Java虚拟机提供了一套用于调试 xff08 JVMDI xff09 和监视 xff08 JVMPI xff09 的接口 xff0c Java5之后统一为JVMTI xff1a http docs oracle com javase 1 5
  • 使用CXF和camel-cxf调用webservice

    CXF是什么 Apache CXF 是一个开源的 全功能的WebService框架 xff0c 它提供了一套工具和API来帮助开发和构建WebService xff0c 像 JAX WS 和 JAX RS 它也支持许多WebService标
  • Java国际化:BreakIterator

    译自 xff1a http tutorials jenkov com java internationalization breakiterator html xff0c 不准确别怪我 java text BreakIterator 类用来
  • build-helper-maven-plugin的使用

    build helper maven plugin 插件主要的作用就是用来指定额外的源码路径和资源路径 它总共有15个goal xff1a build helper add source Add more source directorie
  • tkinter进阶版——ttk

    很长的一段时间里 xff0c 我都是用tkinter进行GUI设计的 xff0c 还写过一篇 tkinter模块常用参数 但后来慢慢地觉得 xff0c 这个tkinter真的是有点丑啊 于是 xff0c 找到了现在的ttk ttk是什么呢
  • Spring 参考资料

    拦截器顺序参考 xff1a http www cnblogs com yjmyzz p how to custom filter provider and token in spring security3 html Spring框架详细参
  • 自定义Spring MVC中的数据绑定

    默认情况下 xff0c spring mvc的数据映射的实现是自动查找请求中的key为参数名的parameter的值 比如有以下方法 xff1a 64 RequestMapping value 61 34 xml 34 method 61
  • 微信分享实现

    本文简单的介绍在微信里打开某个网站 xff0c 希望在点击 分享到朋友圈 或 发送给朋友 时 xff0c 自定义分享的内容 xff0c 即使用 JS SDK 实现分享功能 1 前提 要想分享成功 xff0c 需要申请一个公共号 xff0c
  • Android 使用Headless Fragment 处理Configuration Changes情况

    Android开发中 xff0c AsyncTask是最常用的异步方法 xff0c 功能结构设计的也很丰富 xff0c 给使用者足够的控制 因此对于一些较短的 xff08 1 xff0c 2秒 xff09 xff0c CPU密集计算或读写文
  • PL/SQL 显示行数以及sql窗口列表

    tools gt Preferences gt user Interface gt Editor gt Other gt gt 勾上Display line numbers 如果到这里 xff0c 你地工具地SQL行数还未显示 xff0c
  • JS利用正则替换指定字符

    javaScript如何替换字符 定义和用法 replace 方法用于在字符串中用一些字符替换另一些字符 xff0c 或替换一个与正则表达式匹配的子串 语法 stringObject replace regexp replacement 参
  • myEclipse编辑器大小写转换

    就是在MyEclipse中把选中的一部分代码变成全部大写或小写 MyEclipse中把选中的一部分代码变成全部大写或小写快捷键 xff08 其实就是在编写SQL语句时 xff0c 先输入小写 xff0c 这样看着习惯些 xff0c 也容易读
  • cygwin运行常见问题(cygwin warning:MS-DOS style path detected: )

    cygwin 1 7 release 一月 5th 2010 at 11 27 日新月異 很久沒寫軟體相關的東西 xff0c 不過年前 2009年12月 正式釋出的cygwin 1 7值得一提 cygwin是win32底下最完整的一套pos
  • 人与人之间的差距,从大学拉大。(30条建议)

    1 一个年轻人 xff0c 如果在这四年的时间里 xff0c 没有任何想法 xff0c 他这一生 xff0c 就基本这个样子 xff0c 没有多大改变了 2 成功者就是胆识加魄力 xff0c 曾经在火车上听人谈起过温州人的成功 xff0c
  • Numpy库的下载及安装(吐血总结)

    Python很火 xff0c 我也下了个来耍耍一阵子 可是渐渐地 xff0c 我已经不满足于它的基本库了 xff0c 我把目光转到了Numpy 然而想法总是比现实容易 xff0c 因为我之前下的是Python3 3 x xff0c 所有没有
  • cygwin connection closed by ::1

    Cygwin 1 7 1版本ssh问题 解决办法一 在安装 好Cygwin 1 7 1后 xff0c 进入Cygwin会遇到mkpasswd和mkgroup提示 xff0c 强行做ssh 配置 xff0c 执行sshlocalhost 会报
  • Hadoop错误汇总(更新中)

    2012 05 24 13 40 727人阅读 评论 0 收藏 举报 1 ERROR org apache hadoop hdfs server datanode DataNode java io IOException Incompati
  • 在VMWare Workstation8.0上使用ubuntu11安装和配置Hadoop群集环境03_hadoop的安装

    将hadoop 0 21 0 tar gz通过SSH Secure File Transfer Client上传到usr目录下 1 修改 usr hadoop 0 21 0 conf 目录下的master文件 xff0c 内容如下 xff1