CENTOS7 version minimal is installed by default and does not acquire an IP address and requires manual configuration. Here's how:
1. Enter "IP addr" and press ENTER to confirm that the IP is not available (CentOS 7 does not have ifconfig command by default), and the name of the network adapter is recorded (Ens33 in this example).
2. Enter "cd/etc/sysconfig/network-scripts/" press ENTER to confirm, continue to enter "LS" press ENTER to view the file.
3. Enter "VI ifcfg-ens33" and press ENTER to confirm (the NIC name may be different). You can also directly edit the file by entering "Cd/etc/sysconfig/network-scripts/ifcfg-ens33" directly in the second step.
4. Look at the last item (in the Blue box) and find it as "Onboot=no".
5. Press "I" key to enter the editing state, the last line "No" is modified to "yes", then press "ESC" key to exit the edit state, and enter ": X" to save exit.
6. Enter "Service network restart" to restart the services, or enter "Systemctl restart Netwrok".
7. Re-enter "IP addr" To view, now automatically obtain the IP address.
Transferred from: http://www.ytyzx.net/index.php/%E5%A6%82%E4%BD%95%E8%AE%BE%E7%BD%AECentOS_7%E8%8E%B7%E5%8F%96%E5%8A%A8%E6% 80%81%e5%8f%8a%e9%9d%99%e6%80%81ip%e5%9c%b0%e5%9d%80
CentOS 7 How to set Linux boot auto Get IP address