hadoop生態搭建(3節點)-01.基礎配置
阿新 • • 發佈:2018-10-08
網絡 restart sys top 基礎 公鑰私鑰 script pro otp
# 基礎配置
# ==================================================================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:\Windows\System32\drivers\etc 在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 # 快照 初始化
hadoop生態搭建(3節點)-01.基礎配置