zoukankan      html  css  js  c++  java
  • Hadoop 2.2.0 在centos6.2 64位下的安装--分布式模式

    首先,要有Linux 64位的安装包,这个要自己编译,编译方法参见我的这篇帖子:http://www.cnblogs.com/conbein/p/3793166.html ,如果实在不想编译,留言发给你

    具体安装过程可参考:http://blog.csdn.net/gobitan/article/details/13503717

    集群情况:

    IP                     HostName                Roles
    192.168.10.117         h2s117                  NameNode
                                                   SecondaryNameNode
                                                   ResourceManager
    
    192.168.10.111         h2s111                  DataNode
                                                   NodeManager
    
    192.168.10.112         h2s112                  DataNode
                                                   NodeManager

    这里只贴出自己的配置:

    core-site.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
    <!--
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
    
        http://www.apache.org/licenses/LICENSE-2.0
    
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License. See accompanying LICENSE file.
    -->
    
    <!-- Put site-specific property overrides in this file. -->
    
    <configuration>
      <property>
          <name>fs.defaultFS</name>
          <value>hdfs://h2s117:9000</value>
      </property>
      <property>
        <name>fs.default.name</name>
        <value>hdfs://h2s117:9000</value>
      </property>
      <property>
          <name>io.file.buffer.size</name>
          <value>131072</value>
      </property>
      <property>
          <name>hadoop.tmp.dir</name>
          <value>/home/hadoop/hadoop_space/tmp</value>
          <description>Abase for other temporary directories.</description>
      </property>
      <property>
            <name>hadoop.proxyuser.root.hosts</name>
            <value>*</value>
      </property>
      <property>
            <name>hadoop.proxyuser.root.groups</name>
            <value>*</value>
      </property>
    
    </configuration>
    hdfs-site.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
    <!--
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
    
        http://www.apache.org/licenses/LICENSE-2.0
    
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License. See accompanying LICENSE file.
    -->
    
    <!-- Put site-specific property overrides in this file. -->
    
    <configuration>
      <property>
            <name>dfs.namenode.secondary.http-address</name>
            <value>h2s117:9001</value>
      </property>
      <property>
            <name>dfs.namenode.name.dir</name>
            <value>file:/home/hadoop/hadoop_space/dfs/name</value>
      </property>
      <property>
            <name>dfs.datanode.data.dir</name>
            <value>file:/home/hadoop/hadoop_space/dfs/data</value>
      </property>
      <property>
            <name>dfs.replication</name>
            <value>1</value>
      </property>
      <property>
            <name>dfs.webhdfs.enabled</name>
            <value>true</value>
      </property>
    </configuration>
    mapred-site.xml
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
    <!--
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
    
        http://www.apache.org/licenses/LICENSE-2.0
    
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License. See accompanying LICENSE file.
    -->
    
    <!-- Put site-specific property overrides in this file. -->
    
    <configuration>
      <property>
            <name>mapreduce.framework.name</name>
            <value>yarn</value>
      </property>
      <property>
            <name>mapreduce.jobhistory.address</name>
            <value>h2s117:10020</value>
      </property>
      <property>
            <name>mapreduce.jobhistory.webapp.address</name>
            <value>h2s117:19888</value>
      </property>
    </configuration>
    yarn-site.xml
    <?xml version="1.0"?>
    <!--
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
    
        http://www.apache.org/licenses/LICENSE-2.0
    
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License. See accompanying LICENSE file.
    -->
    <configuration>
    
    <!-- Site specific YARN configuration properties -->
    
      <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>
      <property>
            <name>yarn.resourcemanager.address</name>
            <value>h2s117:8032</value>
      </property>
      <property>
            <name>yarn.resourcemanager.scheduler.address</name>
            <value>h2s117:8030</value>
      </property>
      <property>
            <name>yarn.resourcemanager.resource-tracker.address</name>
            <value>h2s117:8035</value>
      </property>
      <property>
            <name>yarn.resourcemanager.admin.address</name>
            <value>h2s117:8033</value>
      </property>
      <property>
            <name>yarn.resourcemanager.webapp.address</name>
            <value>h2s117:8088</value>
      </property>
    
    </configuration>

    注:hostname中不能有下划线,不然会出现执行start-dfs.sh时,在master节点没有启动namenode而跑到slave节点上去执行namenode的启动。

  • 相关阅读:
    Mybatis获取插入记录的自增长ID
    mybatisGenerator 代码自动生成报错 Result Maps collection already contains value for BaseResultMap
    <c:if test="value ne, eq, lt, gt,...."> 用法
    大话设计模式之----状态模式
    php文件加锁 lock_sh ,lock_ex
    in_array 判断问题的疑惑解决。
    我是一只IT小小鸟观后感
    《世界是数字的》
    我是一只IT小小鸟
    解压缩
  • 原文地址:https://www.cnblogs.com/conbein/p/3794704.html
Copyright © 2011-2022 走看看