1.先保证虚拟机可以上网 # 在物理机上设置网络模式为nat模式 # 在虚拟机上设置动态ip [root@node1 ~]# ifconfig # 查看自己的虚拟机设备是什么名字,就写什么名字 [root@node1 ~]# vim /etc/sysconfig