zoukankan      html  css  js  c++  java
  • 配置hadoop

    在根目录下

    cd etc

    cd network-scripts/

    vim ifcfg-eth0

    DEVICE=eth0
    HWADDR=08:00:27:92:9D:6D
    TYPE=Ethernet
    UUID=67c28e67-41df-4c0d-a399-fce07b3b265d
    ONBOOT=yes
    NM_CONTROLLED=yes
    BOOTPROTO=static
    IPADDR=192.168.56.2
    NETMASK=255.255.255.0
    GATEWAY=192.168.56.1

    保存并退出

    service network restart重启网络

    ifconfig 查看

    关闭防火墙  service iptables stop
    永久关闭防火墙  chkconfig iptables off

     配置ssh公钥  ssh-keygen -t rsa   一路回车

     进入cd  /root/app/hadoop-2.6.0-cdh5.7.0/etc/hadoop

      修改配置文件:

        1.hadoop-env.sh
                   export JAVA_HOME=/root/app/jdk1.8.0_161
                   export HADOOP_HOME=/root/app/hadoop-2.6.0-cdh5.7.0


        2.core-site.xml
                   <property>
                            <name>fs.default.name</name>
                            <value>hdfs://master:8020</value>
                   </property>
                   <property>
                            <name>hadoop.tmp.dir</name>
                            <value>/opt/hdfs/tmp</value>
                   </property>


        3.hdfs-site.xml
                   <property>
                            <name>dfs.replication</name>
                            <value>3</value>
                   </property>
                   <property>
                            <name>dfs.name.dir</name>
                            <value>/root/data/name</value>
                   </property>
                   <property>
                            <name>dfs.data.dir</name>
                            <value>/root/data/data</value>
                   </property>


        4.mapred-site.xml(cp mapred-site.xml.template mapred-site.xml)
                    <property>
                           <name>mapreduce.framework.name</name>
                           <value>yarn</value>
                   </property>


        5.yarn-site.xml
                      <property>
                           <name>yarn.resourcemanager.address</name>
                           <value>master:8080</value>
                      </property>
                      <property>
                           <name>yarn.resourcemanager.resource-tracker.address</name>
                           <value>master:8082</value>
                      </property>
                      <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>


        6.slaves
             master

    格式化  hadoop namenode -format

    启动hadoop 进入 cd /root/app/hadoop-2.6.0-cdh5.7.0/sbin  执行./start-all.sh

    启动之后查看jps

  • 相关阅读:
    openlayers 聚合效果
    OpenLayers 3 实现轨迹回放
    经纬度和墨卡托互相转换
    OpenLayers 3 给features 添加手势
    OpenLayers 3 实现划线,画点
    C# 在窗体的子线程中创建新窗体
    openlayers 3 读取展示shp文件
    地理信息未来5年规划
    OpenLayers3 实现自定义放大缩小滑块,自定义方向按钮
    2014最后一篇,记ExpandableListViewd的自定义
  • 原文地址:https://www.cnblogs.com/nuliyao123/p/14135557.html
Copyright © 2011-2022 走看看