How to disable NetworkManager in RHEL?

网友投稿 780 2022-09-01

How to disable NetworkManager in RHEL?

How to disable NetworkManager in RHEL?

EnvironmentRed Hat Enterprise Linux 5Red Hat Enterprise Linux 6Red Hat Enterprise Linux 7Red Hat Enterprise Linux 8NetworkManager service.IssueDisabling NetworkManager

What steps are needed to disable the NetworkManager service?What is needed to ensure it does not start again on a subsequent reboot?Disabled NetworkManager but still seeing errors (need to fully disable)

Trouble configuring networking with NetworkManager and need to disable.Disabled NetworkManager but still seeing errors about it and “Connection activation failed”ResolutionFOR RHEL5 and RHEL6.

Disabling NetworkManager.The steps below will disable network manager and allow the interface to be managed by the network service instead.

Stop the NetworkManager service:

Rawservice NetworkManager stopDisable it permanently so that the NetworkManager service will not be started on next boot:

Rawchkconfig NetworkManager offConfirm if the NetworkManager service has been disabled:

Rawchkconfig —list|grep NetworkManagerAdd below parameter in /etc/sysconfig/network-scripts/ifcfg-ethX to ensure NetworkManagerdoes not take control of the interface in case if it is accidentally activated.

RawNM_CONTROLLED=”no”Note: Be sure to change the NM_CONTROLLED=”yes” to “no” or the network service may complain about “Connection activation failed” when it cannot find an interface to start.

Switching to the “network” serviceOnce NetworkManager is disabled, the interface can be configured for use with the network service.

Set the correct IP address by editing the file: /etc/sysconfig/network-scripts/ifcfg-eth0

RawIPADDR=……NETMASK=…..GATEWAY=…..ONBOOT=yesBOOPROTO=staticNM_CONTROLLED=noSet the DNS servers to be used by editing the file : /etc/resolv.conf

Rawnameserver 10.x.x.1nameserver I0.x.x.2Restart the network service

Rawchkconfig network onservice network restartFOR RHEL7 and RHEL8

For only RHEL8, network-scripts needs installing and enabling since it is deprecated.Rawyum install network-scriptssystemctl enable network.serviceDisabling NetworkManager.Stop the NetworkManager service:

Rawsystemctl stop NetworkManagerTo disable the service permanently:

Rawsystemctl disable NetworkManagerAdd below parameter in /etc/sysconfig/network-scripts/ifcfg-enXXX to ensure NetworkManagerdoes not take control of the interface in case if it is accidentally activated.

RawNM_CONTROLLED=”no”Switching to the “network” serviceOnce NetworkManager is disabled, the interface can be configured for use with the network service.

Set the correct IP address by editing the file: /etc/sysconfig/network-scripts/ifcfg-enXXX

RawIPADDR=……NETMASK=…..GATEWAY=…..ONBOOT=yesBOOPROTO=staticNM_CONTROLLED=noRestart the network service

Rawsystemctl restart network.serviceRoot CauseThe NetworkManager service may not be needed for server environments as it may override changes made to network configuration files, which may be undesirable.

If the NetworkManager services is not needed or not working as expected, then the network service can be used instead.

Diagnostic StepsThe NetworkManager service seems to be taking over the ifcfg script files and changing them to incorrect information.

Check on if the NetworkManager service is enabled or running to see if it should be disabled:

Rawchkconfig —list | grep NetworkManagerservice NetworkManager statusIf NetworkManager is disabled, but when starting the network service there are errors and messages regarding:

NetworkManager“Connection activation failed”Check to be sure that at least one working ifcfg-ethX file in /etc/sysconfig/network-scripts does not contain “NM_CONTROLED=yes” .

Linux

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Linux 7 中 /etc/sysctl.conf文件说明
下一篇:Laravel 已登陆用户再次查看登陆页面的自动跳转设置方法(laravel手册)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~