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