1) edit the Nic configuration file: vi/etc/sysconfig/network-scripts/ifcfg-eth0, where eth0 is the Nic device alias, representing the first Nic, if you want to edit the configuration files of other NICs, you may need to change this file to eth1, eth2, eth3 .... 2) Follow the prompts in the red box to modify the configuration file. ONBOOT = yes indicates that the device is activated when the system starts, and BOOTPROTO = dhcp indicates
1) edit the Nic configuration file: vi/etc/sysconfig/network-scripts/ifcfg-eth0, where eth0 is the Nic device alias, representing the first Nic, if you want to edit the configuration files of other NICs, you may need to change this file to eth1, eth2, eth3 ....
2) Follow the prompts in the red box to modify the configuration file. ONBOOT = yes indicates that the device is activated when the system starts. BOOTPROTO = dhcp indicates that the IP address obtained by The NIC is dhcp, if you want to change it to static, you can set this value to static.
3) restart the network service and the service network restart
4) done!