用虚拟机启动linux时无法连接网络,重新设置静态ip后重启网络显示Job for network.service failed because the control process exited with error code. See “systemctl status network.service” and “journalctl -xe” for details.
如下,在进行网络重启时显示如下错误
网上查看后,发现问题为和 NetworkManager 服务有冲突,直接关闭服务即可解决
解决:
[root@localhost itcast]# systemctl stop NetworkManager
[root@localhost itcast]# systemctl disable NetworkManager
然后:重启网卡:
[root@localhost itcast]# systemctl restart network
[root@localhost itcast]# ifconfig
禁止开机启动
[root@localhost itcast]# chkconfig NetworkManager off