公司要求必须使用Windows,不允许使用商业软件,所以虚拟机的搭建基于Windows的VirtualBox
重点是网络设置,参见:
https://www.linuxidc.com/Linux/2018-04/151924.htm
ssh-keygen -t rsa
机器是一个集群
vi /etc/profile
192.168.56.10 pangu10
192.168.56.11 pangu11
192.168.56.12 pangu12
说明:pangu是盘古的意思,随便取的一个好记的名字
vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=pangu10
vi /etc/hostname
pangu10
vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s3
UUID=6adc2574-e95f-4346-8fbe-24638b971c90
DEVICE=enp0s3
ONBOOT=yes
IPADDR=192.168.56.11
此域名设置完需要机器重启
关闭防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service
禁用SELINUX
vi /etc/sysconfig/selinux
SELINUX=enforcing
SELINUX=disabled
vi /etc/ssh/sshd_config
RSAAuthentication yes #开启私钥验证
PubkeyAuthentication yes #开启公钥验证
for a in {11..12} ; do scp /etc/ssh/sshd_config [email protected]$a:/etc/ssh/sshd_config ; done
systemctl restart sshd
ssh-copy-id -f -i ~/.ssh/id_rsa.pub [email protected]
ssh-copy-id -f -i ~/.ssh/id_rsa.pub [email protected]
ssh-copy-id -f -i ~/.ssh/id_rsa.pub [email protected]
原文地址:https://www.cnblogs.com/Netsharp/p/9781158.html