Centos7中,默认的网络管理是NetworkManager,NetworkManager在桌面系统中比较好用,对于服务器,真的没什么用,双网卡绑定必须停止和禁用NetworkManager服务,还是network比较方便,停用NetworkManager,开启network。
1
2
3
4
5
6
7
|
[root@45 ~]
# systemctl disable NetworkManager
Removed
symlink
/etc/systemd/system/multi-user
.target.wants
/NetworkManager
.service.
Removed
symlink
/etc/systemd/system/dbus-org
.freedesktop.NetworkManager.service.
Removed
symlink
/etc/systemd/system/dbus-org
.freedesktop.nm-dispatcher.service.
[root@45 ~]
# systemctl enable network
network.service is not a native service, redirecting to
/sbin/chkconfig
.
Executing
/sbin/chkconfig
network on
|
查看network是否开机启动
1
2
3
4
5
6
7
8
9
10
|
[root@45 ~]
# chkconfig --list |grep 3:on
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
If you want to list systemd services use
'systemctl list-unit-files'
.
To see services enabled on particular target use
'systemctl list-dependencies [target]'
.
mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
shadowsocks 0:off 1:off 2:on 3:on 4:on 5:on 6:off
|
本文转自 boy461205160 51CTO博客,原文链接:http://blog.51cto.com/461205160/1944922