For few reasons it becomes necessary to change IP address on your Linux Server. You need to change your IP address if you are changing your Host, getting dedicated IP or anything alike.
Following instruction will help you to change IP address.
Login to your server (preferably via console or SSH) and switch to the root user
Open network configuration file and update it accordingly.
#root: vi /etc/sysconfig/network-scripts/ifcfg-eth0
Press i ( for insert ) and change the file once updated press ESC and save setting with (:w) also you have to change the host name and the default gateway of the machine.
For this you have to edit one more file
#root: vi /etc/sysconfig/network modify the configuration by using the “i” ( insert ) to change your new hostname and gateway information. After completion hit ESC and save setting using (:w )
Reboot machine using : #root : reboot or restart network by #root: service network restart.
You can now see the new IP address and host name that you had assigned.