1. 停止并取消NetworkManager
systemctl stop NetworkManager
systemctl disable NetworkManager
2. 修改网络配置文件
vi /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO="none"
...
IPADDR="192.168.1.112"
NETMASK="255.255.255.0"
GATEWAY="192.168.1.254"
DNS1=8.8.8.8
DNS2=8.8.4.4
3. 启动network并保持开机启动
systemctl start network
systemctl enable network