• Increase font size
  • Default font size
  • Decrease font size
change ip address

 Activate network interface eth0 with a new IP (172.168.10.50) / netmask:
$ sudo ifconfig eth0 172.168.10.50 netmask 255.255.255.0 up

 

Login to your server (preferrably via console or SSH) and switch to the root user 

#vi /etc/sysconfig/network-scripts/ifcfg-eth0

alt

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@localhost ~]# service network restart

Shutting down interface eth0:  [  OK  ]

Shutting down loopback interface:  [  OK  ]

Setting network parameters:  [  OK  ]

Bringing up loopback interface:  [  OK  ]

Bringing up interface eth0:  [  OK  ]

 

 
#vi /etc/sysconfig/network-scripts/ifcfg-eth0

press "SHift+i"

BOOTPROTO=static

IPADDR=192.168.0.199

NETMASK=255.255.255.0

Save the configuration file by press ESC + ‘:’ and type ‘wq’ to write and quit the editor.

Read more...  

Login Form