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