I installed centos7 in vmware,it went well at first. But when I ran it, I found it cannot ping any domain, I reallized the network of it has some problems.
So this is my method to resolve it.
first, open the edit of network
second, choice the VMnet8
then, click NAT setting, Note that the last digit of the gateway here cannot be 1
after clicking the confirm, return to home and click 网络适配器, change to 自定义mode and change it to Vmnet8, then click confirm
Settings in CentOS 7
then change BOOTPROTO=dhcp to BOOTPROTO=static
change ONBOOT=NO to ONBOOT=yes
Finally, add the following code at the end
systemctl restart network