VMware安装CentOS 6.8教程:
---传送门-->
可能是史上最详细的VMware安装Centos 6.8 minimal版图文教程
1.VMware中虚拟网络编辑器设置
查看系统网关IP地址
2.编辑虚拟机设置,添加网络适配器
若没有网络适配器则添加即可
3.Windows端网络配置
4.虚拟机中网络配置
[root@VOS3000 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 #网卡设备名,请勿修改名字 TYPE=Ethernet #网络类型,以太网 BOOTPROTO=static #启用静态IP地址 ONBOOT=yes #开启自动启用网络连接 IPADDR=192.168.2.132 #设置IP地址 GATEWAY=192.168.2.1 #设置网关 DNS1=8.8.8.8 #设置DNS
[root@VOS3000 ~]# service network restart //重启网卡
查看虚拟机IP地址
[root@VOS3000 ~]# ifconfig eth0 Link encap:Ethernet HWaddr 00:0C:29:89:4A:52 inet addr:192.168.2.132 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe89:4a52/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:235 errors:0 dropped:0 overruns:0 frame:0 TX packets:112 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:19964 (19.4 KiB) TX bytes:14593 (14.2 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:4 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:268 (268.0 b) TX bytes:268 (268.0 b)
5.测试外网
[root@VOS3000 ~]# ping www.baidu.com -c 5 PING www.wshifen.com (104.193.88.77) 56(84) bytes of data. 64 bytes from 104.193.88.77: icmp_seq=1 ttl=128 time=198 ms 64 bytes from 104.193.88.77: icmp_seq=2 ttl=128 time=197 ms 64 bytes from 104.193.88.77: icmp_seq=3 ttl=128 time=198 ms 64 bytes from 104.193.88.77: icmp_seq=4 ttl=128 time=201 ms 64 bytes from 104.193.88.77: icmp_seq=5 ttl=128 time=197 ms --- www.wshifen.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4262ms rtt min/avg/max/mdev = 197.425/198.512/201.556/1.647 ms
可以看到网络已经通了。