The CENTOS7 is installed in the virtual machine in a minimized manner, and the Internet is not available because the CENTOS7 default NIC is not activated.
And in the Sbin directory there is no Ifconfig file, this is because CENTOS7 has not used the Ifconfig command, has been replaced with IP command;
and the network card name is not eth0, but changed into eno16777736.
Resolve Ifconfig is not available: IP addr that is to view the distribution of network adapter.
To activate the NIC: in File/etc/sysconfig/network-scripts/ifcfg-enp0s3
Enter edit mode, change Onboot=no to Onboot=yes, OK
Restart NIC after saving: Service network restart
The Internet is available at this time. (If you do not know how to determine whether the Internet, ping the URL can be, it is so simple, such as command: Ping www.baidu.com)
So yum,wget and so on can be used.
This article from "Xiao Mary" blog, reproduced please be sure to keep here http://blog.csdn.net/qq_31382921/article/details/52174626