When configuring servers, this is pretty often required in our line of work. Setting up a hosting server, router, load balancer, DNS server... These are everyday scenarios for most DevOps people to tackle around. In this light, we wanted to run through the process of setting up the static IP address on the CentOS 8 server.
Open nmtui command line tool for linux NetworkManager using the following command:
$ sudo nmtui
It will open options selection form:
We should choose the "Edit a connection" and hit ENTER. Next, we need to choose the interface. In our case that is the "System eth0":
Hit ENTER and you'll see the interface properties you can manipulate. From here, we need to edit the IPV4 section and add the IP addresses suiting your own scenario (we have used the IP addresses per our own use case):
Go down to <OK> and exit the nmtui tool. Now we just need to restart network service. We can do it by running the command:
$ sudo systemctl restart NetworkManager.service
That's pretty much it! We have set the static IP address on CentOs 8 server 😁. You can verify the setting by using "ifconfig" command or similar:
$ ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 220.127.116.11 ...
Check out our EDU page for more useful articles 😁.