• 06.第二名称节点配置


    克隆一台机器s105来专门存放SecondaryNameNode
    1、克隆s100 -> s105
     
        2、打开s105,修改hostname和静态ip
            hostname    // /etc/hostname
            静态ip        // /etc/sysconfig/network-scripts/ifcfg-ens33
     
        3、重启虚拟机,通过putty进行连接
     
        3.5、修改s101的hosts文件,添加
            192.168.116.105 s105
     
             并配置ssh免密登陆
                 ssh-copy-id centos@s105
     
        4、配置root的ssh免密登陆
            1)切换到root
                su root
            2)生成公私密钥对
                ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
            3)配置免密登陆
                ssh-copy-id root@s101
                ssh-copy-id root@s102
                ssh-copy-id root@s103
                ssh-copy-id root@s104
                ssh-copy-id root@s105
     
        5、使用root权限在所有机器上安装rsync
            xcall.sh yum install -y rsync
     
        6、修改配置文件/soft/hadoop/etc/hadoop/hdfs-site.xml
            添加配置
            <property>
              <name>dfs.namenode.secondary.http-address</name>
              <value>s105:50090</value>
            </property>
     
        7、删除其他节点的所有etc文件夹
            ssh s102 rm -rf /soft/hadoop/etc
            ssh s103 rm -rf /soft/hadoop/etc
            ssh s104 rm -rf /soft/hadoop/etc
            ssh s105 rm -rf /soft/hadoop/etc
     
     
        8、编写xsync脚本,使用此脚本将所有配置文件进行同步
     
            xsync.sh  /soft/hadoop/etc
     
    9. /etc/hosts
    同步到s101-  s105
     
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    192.168.116.101 s101
    192.168.116.102 s102
    192.168.116.103 s103
    192.168.116.104 s104
    192.168.116.105 s105

     

  • 相关阅读:
    LeetCoded第21题题解--合并两个有序链表
    入门数据结构与算法,看这一个就够了,知识点+LeetCode实战演练
    LeetCoded第242题题解--java--数组
    映射Map、队列Queue、优先级队列PriorityQueue
    链表LinkedList、堆栈Stack、集合Set
    bzoj1588: [HNOI2002]营业额统计
    bzoj3223: Tyvj 1729 文艺平衡树
    bzoj1503: [NOI2004]郁闷的出纳员
    hdu1700 Points on Cycle
    poj1981 Circle and Points
  • 原文地址:https://www.cnblogs.com/star521/p/10241106.html
Copyright © 2020-2023  润新知