• hadoop生态搭建(3节点)-01.基础配置


    # 基础配置
    # ==================================================================node1

    vi /etc/hostname
    node1
    
    
    vi /etc/sysconfig/network-scripts/ifcfg-ens33
    # BOOTPROTO=dhcp
    BOOTPROTO=static
    # ONBOOT=no
    ONBOOT=yes
    IPADDR=192.168.6.131
    NETMASK=255.255.255.0
    GATEWAY=192.168.6.2
    DNS1=192.168.6.2
    
    
    # 重启下网络服务
    systemctl restart network.service
    # service network restart
    
    # 查看网络状态
    systemctl status network.service
    
    # 查看IP
    ip addr
    
    # 直接关闭防火墙
    # 停止firewall
    systemctl stop firewalld.service
    
    # 禁止 firewall 开机启动
    systemctl disable firewalld.service
    
    
    reboot

     # ==================================================================node1

    # 配置hosts
    vi /etc/hosts
    192.168.6.131 node1 192.168.6.132 node2 192.168.6.133 node3 # 关闭SELinux vi /etc/sysconfig/selinux SELINUX=disabled vi /etc/ssh/sshd_config #RSAAuthentication yes #启用 RSA 认证 #PubkeyAuthentication yes #启用公钥私钥配对认证方式 #AuthorizedKeysFile .ssh/authorized_keys #公钥文件路径(和上面生成的文件同) systemctl restart sshd.service # service sshd restart # network vi /etc/sysconfig/network NETWORKING=yes HOSTNAME=node1 # 需将Windows文件上传到虚拟机中需配置 # C:WindowsSystem32driversetc 在host文件中加入对应ip与机器名 192.168.6.131 node1 192.168.6.132 node2 192.168.6.133 node3 shutdown -h now # 快照 初始化 # 克隆 node2 node3

     # ==================================================================node2

    vi /etc/hostname
    node2
    
    
    vi /etc/sysconfig/network
    NETWORKING=yes
    HOSTNAME=node2
    
    
    vi /etc/sysconfig/network-scripts/ifcfg-ens33
    # BOOTPROTO=dhcp
    BOOTPROTO=static
    # ONBOOT=no
    ONBOOT=yes
    IPADDR=192.168.6.132
    NETMASK=255.255.255.0
    GATEWAY=192.168.6.2
    DNS1=192.168.6.2
    
    
    systemctl restart network.service
    
    
    shutdown -h now
    # 快照 初始化

     # ==================================================================node3

    vi /etc/hostname
    node3
    
    
    vi /etc/sysconfig/network
    NETWORKING=yes
    HOSTNAME=node3
    
    
    vi /etc/sysconfig/network-scripts/ifcfg-ens33
    # BOOTPROTO=dhcp
    BOOTPROTO=static
    # ONBOOT=no
    ONBOOT=yes
    IPADDR=192.168.6.133
    NETMASK=255.255.255.0
    GATEWAY=192.168.6.2
    DNS1=192.168.6.2
    
    
    systemctl restart network.service
    
    
    shutdown -h now
    # 快照 初始化

    转载于:https://www.cnblogs.com/zcf5522/p/9753480.html

  • 相关阅读:
    [每日一讲] Python系列:浅拷贝与深拷贝
    [每日一讲] Python系列:变量、内存管理与传递
    [每日一讲] Python系列:字典
    [每日一讲] Python系列:列表与元组
    [已开源/文章教程]独立开发 一个社交 APP 的源码/架构分享 (已上架)
    从选择到上传,可能是最贴心的高仿朋友圈编辑了
    完整的社交app源码android+laravel
    基于Laravel+Swoole开发智能家居后端
    APP架子迁移指南(三)
    Laravel如何优雅的使用Swoole
  • 原文地址:https://www.cnblogs.com/twodog/p/12135823.html
Copyright © 2020-2023  润新知