1. find your gateway
[root@scael101 ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.132.251.0 0.0.0.0 255.255.255.0 U 0 0 0 xenbr0
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 bond1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 xenbr0
0.0.0.0 10.132.251.1 0.0.0.0 UG 0 0 0 xenbr0
2.sync up to the gateway
/usr/sbin/ntpdate 10.132.251.1
3. Sometimes you get the error: "the NTP socket is in use, exiting".
You can kill the ntp daemon: ps -ef|grep ntp; kill -9 <pid>
sync with the gateway, and restart the ntp daemon:
/usr/sbin/ntpd -u ntp:ntp -p /var/run/ntpd.pid
4. if you want your local timezone to be set then do the following as root,
for example,
cd /etc
ln -sf /usr/share/zoneinfo/America/Los_Angeles localtime
No comments:
Post a Comment