# Basic Configuration
# ==================================================================node1
vi/etc/hostnamenode1vi/etc/sysconfig/network-scripts/ifcfg-ens33# bootproto=dhcpbootproto=static# ONBOOT= noonboot=yesipaddr=192.168.6.131netmask=255.255.255.0gateway=192.168.6.2dns1=192.168.6.2# Restart the Network service Systemctl Restart network.service# Service Network restart# View the status Systemctl status network.service# view Ipip addr# direct shutdown Firewall # stop Firewal Lsystemctl Stop firewalld.service# Disable firewall boot up systemctl disable Firewalld.servicereboot
# ==================================================================node1
# Configure Hostsvi/etc/hosts
192.168.6.131 node1192.168.6.132 node2192.168.6.133 node3# Close selinuxvi/etc/sysconfig/selinuxselinux=disabledvi/etc /ssh/sshd_config#rsaauthentication Yes #启用 RSA authentication #pubkeyauthentication Yes #启用公钥私钥配对认证方式 #authorizedkeysfile. ssh/ Authorized_keys #公钥文件路径 (same as the file generated above) systemctl Restart sshd.service# service sshd restart# networkvi/etc/sysconfig/ networknetworking=yeshostname=node1# you need to configure the Windows file to be uploaded to the virtual machine # C:\WINDOWS\SYSTEM32\DRIVERS\ETC Add the corresponding IP and machine name in the host file 192.168.6.131 node1192.168.6.132 node2192.168.6.133 node3 shutdown-h now# Snapshot initialization # clone Node2 Node3
# ==================================================================node2
vi/etc/hostnamenode2vi/etc/sysconfig/networknetworking=yeshostname=node2vi/etc/sysconfig/network-scripts/ ifcfg-ens33# bootproto=dhcpbootproto=static# Onboot=noonboot=yesipaddr=192.168.6.132netmask=255.255.255.0gateway =192.168.6.2dns1=192.168.6.2systemctl Restart Network.serviceshutdown-h now# Snapshot initialization
# ==================================================================NODE3
vi/etc/hostnamenode3vi/etc/sysconfig/networknetworking=yeshostname=node3vi/etc/sysconfig/network-scripts/ ifcfg-ens33# bootproto=dhcpbootproto=static# Onboot=noonboot=yesipaddr=192.168.6.133netmask=255.255.255.0gateway =192.168.6.2dns1=192.168.6.2systemctl Restart Network.serviceshutdown-h now# Snapshot initialization
Hadoop Eco-building (3 nodes)-01. Basic Configuration