본문 바로가기

Linux

How To Uninstall, Disable, and Remove NetworkManager from RHEL6 and CentOS6

반응형

The default install of Red Hat Enterprise Linux 6 (RHEL6 and CentOS6) automatically includes the NetworkManager service which was optional in previous versions. The purpose for NetworkManager is to make RHEL6 more portable which is great for a notebook computer or perhaps a desktop. Portability is not a major concern for a server. Usually servers are fairly fixed and configuration of network settings is done statically using manual tools. NetworkManager also does not support many advanced networking features like IP forwarding.

 

Textbooks and forum posts tell us to simply use yum to uninstall NetworkManager and then go about setting up our server manually as we have in the past. Unfortunately it is not that easy. RHEL6 also includes the new udev system that is great for removeable devices, but presents problems for server network configuration. In my humble opinion, there is no simple way to reverse these changes in RHEL6.

After researching on the Internet, and a little trial and error, here are my suggestions on how to uninstall, disable, and remove NetworkManager from a RHEL6 server:

 

  1. Turn off the service, uninstall it, and make sure you do not try to run it after a reboot:
    service NetworkManager stop
    chkconfig NetworkManager off
    yum erase NetworkManager
  2. Find and remove 70-persistent-net.rules and 75-persistent-net-generator.rules:
    rm -f /etc/udev/rules.d/70-persistent-net.rules
    rm -f /lib/udev/rules.d/75-persistent-net-generator.rules
    1. Manually configure your network interfaces and DNS, and then restart the network service. Here is an example /etc/sysconfig/network-scripts/ifcfg-eth0 file from one of our VMware virtual servers that has been successfully cloned many times:

      DEVICE=eth0
      NM_CONTROLLED=no
      ONBOOT=yes
      BOOTPROTO=dhcp # DHCP client; dynamic address assignment
      TYPE=Ethernet
      DNS1=192.168.10.254 # Insert your nameserver address in this directive
      USERCTL=no
      PEERDNS=yes
      IPV6INIT=no

      Check your interfaces and DNS, then restart the network service:

      system-config-network
      service network restart

 

출처 : http://blog.beausanders.org/blog7/?q=node/19

반응형

'Linux' 카테고리의 다른 글

[Linux] Bonding 설정  (0) 2014.05.21
e2fsck 명령어  (0) 2014.04.18
[미완성포스트]facl  (0) 2014.03.28
iptables  (0) 2014.03.28
Linux의 부트과정  (0) 2014.03.26