Skip to main content

VestaCP Installation Perquisite : Part 4 Disable Network Manager & Set 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 VestaCP hosting Control Panel.
# 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

Comments