1.安装vmware centos7.5.
####查看操作系统版本
[root@localhost network-scripts]# cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) [root@localhost network-scripts]#
#####查看操作系统是64位还是32位
[root@localhost docker]# getconf LONG_BIT
64
[1]+ Exit 127 oot@localhost docker]#
[root@localhost docker]#
2.vmware--编辑--虚拟机网络编辑器
3.虚拟机内部配置network,以达到外部scrt可访问
[root@localhost network-scripts]# pwd /etc/sysconfig/network-scripts [root@localhost network-scripts]# cat ifcfg-ens33 TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=dhcp 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=ens33 UUID=d934adf8-85f1-4074-ac8f-30597f669cd5 DEVICE=ens33 #ONBOOT=no ONBOOT=yes DNS1=192.168.111.2 IPADDR=192.168.111.104 PREFIX=24 GATEWAY=192.168.111.2 PEERDNS=yes PEERROUTES=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes [root@localhost network-scripts]#
4.重启网络
[root@localhost network-scripts]# service network restart
Restarting network (via systemctl): [ OK ]
[root@localhost network-scripts]#