Results 1 to 1 of 1
-
23rd Oct 2009, 05:50 AM #1OPToo busy :|Website's:
L337Fx.com BeastieBay.netChange IP Address on a Linux Server
Change IP Address on a Linux ServerSometimes you run into situations where you need to change the IP address on a Linux server. If you are a "Windows" or "GUI" person, you might feel lost when you have to change the IP address of a Linux machine from the command line. But no worries, the actual process of changing the IP address is not that hard. Here is how it works:
Login to your server (preferrably via console or SSH) and switch to the root user
Now open the network configuration file. For this example we will use the default NIC (eth0).
#root: vi /etc/sysconfig/network-scripts/ifcfg-eth0
Your screen output will look like this
Now modify the configuration by using the "i" command to insert information. When you are done updating the file, hit "ESC" and save the settings with ":w" and exit out with ":x". The file has now been modified, but the changes have not been loaded yet. Next we want to change the host name and the default gateway of the machine. From the root prompt type the following:
#root: vi /etc/sysconfig/network
The screen output will look like this:
Now modify the configuration by using the "i" command to insert your new hostname and gateway information. When you are done updating the file, hit "ESC" and save the settings with ":w" and exit out with ":x". And again ? the network configuration file has now been modified, but the changes have not been loaded yet.
The best way to have the changes take effect is to reboot the server if that is possible. If you are connecting remotely you want to make preparations to be able to connect again to the server. Make sure that the network switch supports the assigned IP address and gateway as otherwise your connection will fail. Send the server for a reboot with the following command:
#root: reboot
A second option is to restart the networking component, but sometimes a reboot is the better option when changing the IP address of a Linux server. On the command prompt type the following:
#root: service network restart
If all went well the server comes back with the new ip address and host name that you assigned.
Tutorial by WHRKIT
Thanks to William Palmer
Edited by TutsBy.MeBlaZe Reviewed by BlaZe on . Change IP Address on a Linux Server Change IP Address on a Linux Server Sometimes you run into situations where you need to change the IP address on a Linux server. If you are a "Windows" or "GUI" person, you might feel lost when you have to change the IP address of a Linux machine from the command line. But no worries, the actual process of changing the IP address is not that hard. Here is how it works: Login to your server (preferrably via console or SSH) and switch to the root user Now open the network configuration Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
How to change IP address Urgent
By RapidshareResellers in forum Technical Help Desk SupportReplies: 24Last Post: 15th Oct 2014, 07:31 AM -
How to change a string in a text file on a Linux server
By Albert.Nawaro in forum Tutorials and GuidesReplies: 0Last Post: 9th Feb 2012, 11:23 AM -
change VPS in linux
By iobit in forum Hosting DiscussionReplies: 0Last Post: 27th Feb 2011, 08:47 PM -
change VSP in linux
By iobit in forum Technical Help Desk SupportReplies: 0Last Post: 23rd Feb 2011, 06:26 AM -
How to Change ip address for websites without proxy
By RapidshareResellers in forum Technical Help Desk SupportReplies: 5Last Post: 9th Oct 2009, 03:43 PM
themaManager - edit and manage...
Version 4.04 released. Open older version (or...