Skip to main content

Installation Perquisite for EFA/Cpanel/CWP7/VestaCP: Part 4 Disable Network Manager & Setup Static IP

This Tutorial describes how to disable the Network Manager service. The Network Manager service automates the network's settings and disrupts connections to the IP addresses that reside in the ipaliases module. We recommend that you disable the Network Manager service and enable the network.service service before you install EFA/Cpanel/CWP7/VestaCP.
# systemctl stop NetworkManager
# systemctl disable NetworkManager
# nmcli device status

# systemctl list-unit-files | grep NetworkManager 

# systemctl enable network.service
# systemctl restart network.service

Reboot The Machine
# reboot 
I have two NIC in my VPS, So Add the below parameter in /etc/sysconfig/network-scripts/ifcfg-eXXX of interfaces that are managed by NetworkManager to make it unmanaged. NM_CONTROLLED="no“
# vi /etc/sysconfig/network-scripts/ifcfg-ens33 
BOOTPROTO=static
NM_CONTROLLED=no
ONBOOT=yes
#DOMAIN=datahead.biz
HOSTNAME=host.datahead.biz

:x  (save & quit)

# vi /etc/sysconfig/network-scripts/ifcfg-ens34
BOOTPROTO=static
NM_CONTROLLED=no
ONBOOT=yes
#DOMAIN=datahead.biz
HOSTNAME=host.datahead.biz

:x  (save & quit) 
Set the Static IP
# cat /etc/sysconfig/network-scripts/ifcfg-ens33 
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=bf35295a-1484-4270-9480-9f2e4de73955
DEVICE=ens33
ONBOOT=yes
IPADDR=x.x.x.x
PREFIX=26
GATEWAY=x.x.x.x
DNS1=8.8.8.8
DNS2=8.8.4.4
Restart the Network Services
# systemctl enable network
# systemctl restart network

Reboot The Machine (Not Necessary)
# reboot 
Disable Network Manager

In EFA, My settings as below
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO="none"
#NM_CONTROLLED=no
#DOMAIN=your-domain.com
HOSTNAME=esg01.your-domain.com
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth0
UUID=a5f5036c-f7c1-4d00-bd85-46797fa2966f
DEVICE=eth0
ONBOOT=yes
IPADDR=X.216.X.200
PREFIX=27
GATEWAY=XXX.109.87.164
IPADDR="X.216.X.200"
NETMASK="255.255.255.224"
GATEWAY="XXX.XXX.87.164"
DNS1="127.0.0.1"
DNS2="::1"

# cat /etc/sysconfig/network
# Created by anaconda
HOSTNAME=esg01.your-domain.com

# cat /etc/resolv.conf
nameserver 127.0.0.1
nameserver ::1

Comments