Environment are as follows:
Operating System: CentOS-7-x86_64-DVD-1908.iso
Proceed as follows:
1. Check the card information
ip a
2. Edit the corresponding network card configuration file, I have here the card is ens33, so I modified the file ifcfg-ens33
vi /etc/sysconfig/network-scripts/ifcfg-ens33
> Modified the file (which is to modify the red part of the last four lines are added static address configuration, configure IP, subnet mask, gateway, and DNS addresses according to their own network environment):
TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=static DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=ens33 UUID=8a809208-fa8e-4c81-adbe-e8ed45e9718c DEVICE=ens33 ONBOOT=yes IPADDR=192.168.1.201 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 DNS1=114.114.114.114
3. Network Service Restart
service network restart