1.檢視window的ip
在windows的cmd指令視窗執行 ipconfig /all
2.vmware設定NAT模式
3. 修改centos虛拟機網卡配置檔案
cd /etc/sysconfig/network-scripts 進入配置目錄
4. 重新開機網卡
service network restart.
P.S.可能遇到Job for network.service failed because the control process exited with error code報錯資訊
解決方案:可能與NetworkManager服務有沖突,
service NetworkManager stop;
并且禁止開機啟動 chkconfig NetworkManager off ;
最後執行 service network restart.