How to configure a static IP address on CentOS 7
To verify the status of Network Manager service:
$ sudo systemctl status NetworkManager.service
To check which network interface is managed by Network Manager, run:
$ nmcli dev status
Have two way to configure a static IP address
Without network manager
Go to the /etc/sysconfig/network-scripts directory, and locate its configuration file (ifcfg-enp0s3). Create it if not found.
Open the configuration file and edit the following variables:
"NM_CONTROLLED=no": This interface will be set up using this configuration file, instead of being managed by Network Manager service.
"ONBOOT=yes": Tells the system to bring up the interface during boot.
Save changes and restart the network service using the following command:
$ sudo systemctl restart network.service
Verify that the interface has been properly configured:
$ ip addr