• 商用hadoop集群的配置命令分布




    角色

    安装

    hdfs配置

    yarn配置

    hdfs 格式化

    启动yarn服务

    启动hdfs服务

    master

    yum install hadoop-hdfs-namenode

    yum install hadoop-yarn-resourcemanager

    core-site.xml

    hdfs-site.xml

    mapred-site.xml

    yarn-site.xml

    hdfs>hdfs namenode -format

    root>service hadoop-yarn-resourcemanager start

    root>service hadoop-hdfs-namenode start

    slave

    yum install hadoop-hdfs-datanode

    yum install hadoop-yarn-nodemanager

    core-site.xml

    hdfs-site.xml

    mapred-site.xml

    yarn-site.xml

    root>service hadoop-yarn-nodemanager start

    root>service hadoop-hdfs-namenode start

    proxy

    yum install hadoop-mapreduce-historyserver

    yum install hadoop-yarn-proxyserver

    core-site.xml

    hdfs-site.xml

    mapred-site.xml

    yarn-site.xml

    root>service hadoop-mapreduce-historyserver start

    root>service hadoop-yarn-proxyserver start

    client

    yum install hadoop-client

    core-site.xml

    hdfs-site.xml

    mapred-site.xml

    yarn-site.xml

    角色

    hdfs本地存储目录

    hdfs云存储目录

    yarn本地存储目录

    master

    mkdir -p /data/dfs/nn

    chown hdfs:hadoop

    slave

    mkdir -p /data/dfs/dn

    chown hdfs:hadoop

    mkdir -p /data/yarn/local

    mkdir -p /data/yarn/logs

    proxy

    client

    hdfs dfs –mkdir /tmp

    hdfs dfs –mkdir /user/history

    hdfs dfs –mkdir /var/log/hadoop-yarn

            


    hdfs本地存储目录,必须授权给用户hdfs:hadoop;yarn本地存储目录,必须授权给用户yarn:hadoop;一切目录设置均与xml文件对应!root用户只有安装、启动服务期限,没有hadoop执行权限。


    Hdfs服务web地址

    cMaster:50070

    Yarn服务web地址

    cMaster:8088

    JobHistory服务web地址

    cProxy:19888


    建立私有账户joe

    [root@iClient~]#adduser joe

    本地新建joe用户

    [root@iClient~]#passwd joe

    更改joe密码

    [hdfs@iClient~]#hdfs dfs –mkdir /user/joe

    在hdfs建立joe的家目录

    [hdfs@iClient~]#hdfs dfs –chown –R joe /user/joe

    给家目录授权

    [hdfs@iClient~]#sudo –u joe hdfs dfs –put /……/yourdata.txt joeInput

    本地文件yourdata.txt上传至joeInput

    [hdfs@iClient~]#sudo –u joe Hadoop jar /…/hadoo-mapreduce-example.jar pi 4 10000

    执行例程的pi,4个map,做10000次。

  • 相关阅读:
    无向连通图求割边+缩点+LCA
    poj 1417(并查集+简单dp)
    java系统时间的调用和格式转换
    Delphi程序的主题(Theme)设置
    分块读取Blob字段数据(Oracle)
    Delphi xe5 编译报environment.proj错误的解决
    DataSnap服务器从xe2升级到xe5报错的处理
    分块读取Blob字段数据(MSSQL)
    Delphi XE5 for Android (十一)
    Delphi XE5 for Android (十)
  • 原文地址:https://www.cnblogs.com/Raodi/p/11477692.html
Copyright © 2020-2023  润新知