# 切换到 root 用户 [hxstrive@localhost ~]$ su 密码: # 开启 ens33 网卡 [root@localhost hxstrive]# ifup ens33 错误:连接激活失败:No suitable device found for this connection (device lo not available because device is strictly unmanaged).
(1)永久关闭 NetworkManager 托管工具,如下:
[root@localhost hxstrive]# chkconfig NetworkManager off 注意:正在将请求转发到“systemctl disable NetworkManager.service”。 Removed symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service. Removed symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service. Removed symlink /etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service.
(2)设置每次开机自动启动 NetworkManager 服务,如下:
[root@localhost hxstrive]# chkconfig network on
(3)停止 NetworkManager 服务,如下:
[root@localhost hxstrive]# service NetworkManager stop Redirecting to /bin/systemctl stop NetworkManager.service
(4)启动 network 服务,如下:
[root@localhost hxstrive]# service network start Starting network (via systemctl): [ 确定 ]
(5)查看 ip 信息,如下:
[root@localhost hxstrive]# ifconfig ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.116.130 netmask 255.255.255.0 broadcast 192.168.116.255 inet6 fe80::20c:29ff:fe8e:419b prefixlen 64 scopeid 0x20<link> ether 00:0c:29:8e:41:9b txqueuelen 1000 (Ethernet) RX packets 16 bytes 2076 (2.0 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 35 bytes 5435 (5.3 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 2 bytes 108 (108.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2 bytes 108 (108.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255 ether 52:54:00:ed:90:d1 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
到这里,问题就解决了……