编辑网卡配置
[root@localhost ~]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# mv ifcfg-ens33 ifcfg-eth0
[root@localhost network-scripts]# vi ifcfg-eth0
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="eth0"
UUID="03300923-5fb7-47c7-8a83-b62e987ece65"
DEVICE="eth0"
ONBOOT="yes"
IPADDR=192.168.30.143
GATEWAY=192.168.30.2
NETMASK=255.255.255.0
DNS1=8.8.8.8
[root@localhost network-scripts]# vi /etc/default/grub
GRUB_CMDLINE_LINUX="crashkernel=auto spectre_v2=retpoline rhgb quiet"
GRUB_CMDLINE_LINUX="crashkernel=auto spectre_v2=retpoline net.ifnames=0 biosdevname=0 rhgb quiet"
[root@localhost network-scripts]# grub2-mkconfig -o /boot/grub2/grub.cfg
[root@localhost network-scripts]# reboot