It has been observed that sometimes the system-config-network or nmtui tool removes the localhost entries from the /etc/hosts file.Įdit your /etc/hosts file and make sure there are localhost entries. There are no additional changes required. Nagios Network Analyzer Specific Settings usr/local/nagioslogserver/var/ cluster_hosts In addition to this, on ALL nodes you need to check the following file has the correct IP addresses: If a DNS entry is used make sure that this resolves to your new IP address.Īfter changing the IP address on your server you should check that the Interface URL is correct.Īdministration > General > Global Settings Please see the following online references:Īfter changing the IP address on your server you should check that the Program URL is correct.Īdmin > System Config > Manage System Config Ping -c 4 ping6 -c 4 The output will be something like: Save the changes in vi by typing :wq and pressing Enter. The final configuration would look like this: TYPE=Ethernet The following lines need to be added to the file (you will need to adjust them to your requirements): The following lines need removing from the file: The following lines need changing in the file: The default configuration will appear something like: TYPE=Ethernet When using the vi editor, to make changes press i on the keyboard first to enter insert mode.
Open the vi editor using this command: vi /etc/sysconfig/network-scripts/ifcfg-eno16777728 The config file for this interface will be in the file /etc/sysconfig/network-scripts/ ifcfg-eno16777728 Here you can see the name of the interface is eno16777728 If you are unable to use nmuti (a text based GUI) to configure your IP address then you will need to configure the interface in the text based configuration file for that interface.įirst you will need to identify the name of the network interface, type the following command: ip addr The important items in the output should be that the interface is in an UP state AND the inet address is correct (and inet6 if defined). Ping -c 4 The output will be something like: Now you will need to take the interface "down" and then back "up" again using the following commands: ifdown eno16777728Įxecute these commands to check your changes have been applied and that they are working: ip addr Press Tab until the Quit button is highlighted and then press Enter You will be returned to the "Select A Device" screen. Press Tab until the OK button is selected press Enter to save the changes The following screenshot is an example configuration: If you want to define a static IPv6 address, follow the same steps above for the IPv6 CONFIGURATION section. Repeat these steps for the Gateway IP and DNS Servers fields Type a valid address with using CIDR notation, for example 10.25.40.70/16 Press Tab until you are on selector next to Addresses Press Tab until you are on (for IPv4) and press Enter Press Enter, select Manual from the list and press Enter Press Tab on your keyboard until you are on selector next to IPv4 CONFIGURATION
You will now be presented with the "Edit Connection" screen. In this example eno16777728 is the default interface selected, press Enter You will presented with a list of devices:
When you execute nmtui you will be prompted with a text based GUI:
Centos 7 static ip config how to#
Please follow the steps in the "Manual IP Configuration" section that explains how to do this. Manually configure address in config file. Once installed execute the command again and proceed with the next step.
Centos 7 static ip config install#
Install the package using yum (which assumes your server has internet access via it's DHCP address): yum install -y net-tools If you receive the following error: -bash: nmtui: command not found In your console session execute the command: nmtui There's an easy way to perform these changes using nmtui (a text based GUI). If you have version 6 please go to the RHEL 6 | CentOS 6 | Oracle Linux 6 section. Version 7 will output something like: CentOS Linux release (Core) If you are unsure what version of RHEL / CentOS your VM is running on you can execute the following command: cat /etc/centos-release These steps are for RHEL 7 | CentOS 7 | Oracle Linux 7. Due to the nature of these changes it is recommended that you perform the actions while logged onto the console of the server, performing the changes from an SSH session may disconnect you from the server.