- service ntpd stop
- ntpd update 192.168.10.100
- sync
- service ntpd start
live, earn and think STORAGE 24 hours
To change interface eth0 IP address.
- Edit /etc/sysconfig/network-scripts/ifcfg-eth0
- Run service network restart
Q. How do I setup my Red Hat / CentOS / Fedora Linux system to get IP address and other information via a DHCP server for eth0 interface?
A. You can edit eth0 configuration file to switch between static and dhcp networking configuration under RHEL / Fedora or CentOS Linux. Simply edit /etc/sysconfig/network-scripts/ifcfg-eth0 file.
First backup existing network configuration file using cp command:# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /root/ifcfg-eth0.bak
Setting up a Linux for dhcp can be done by editing file using a text editor such as vi:# vi /etc/sysconfig/network-scripts/ifcfg-eth0
Following is sample static configuration:DEVICE=eth0
BOOTPROTO=static
HWADDR=00:19:D1:2A:BA:A8
IPADDR=10.10.29.66
NETMASK=255.255.255.192
ONBOOT=yes
Replace static configuration with DHCP:DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:19:D1:2A:BA:A8
ONBOOT=yes
Save and close the file. Just restart network service:# /etc/init.d/network restart
Please note that you need a configuration file for each device that you want to configure to use DHCP.
Linux gives you a “Repair Filesystem” prompt and you can enter that by providing the root password. The problem is that on “Repair Filesystem” prompt, linux file system and rest of the file systems are generally not mounted and if mounted then it is “Read-Only” so you can not change files.
Solution:
Use following command to mount the filesystem with writable permission:
Repair filesystem # mount -w -o remount /
After this you can go and change /etc/fstab file. Restart your computer.