Sunday, September 4, 2011

Linux - Setting Static IP Address

Just a simple reference on how to set static IP address on Linux via command line

I using CentOS 5.6 x64 with only 1 network interface.

1. Use an editor (such as vi) to edit /etc/sysconfig/network-scripts/ifcfg-eth0
2. At ifcfg-eth0, do the following in bold. Note: IP address and net mask is only an example.

Change BOOTPROTO=dhcp ----> BOOTPROTO=static



3. Save ifcfg-eth0
4. Use an editor (such as vi) to edit /etc/sysconfig/network
5. At network, do the following in bold. Note: Gateway is only an example


6. Save network
7. Restart the network interface by service network restart
8. Alternatively, you can restart your server to check if the changes is persistence with reboot


No comments:

Post a Comment

Tomcat - removing server info

Below are the steps to remove Tomcat Server Information 1. Make sure Tomcat is not running 2. Navigate to "Tomcat Installation"...