Step-1
Check the time difference between the NTP server and Client. If the time difference is more than 1024 seconds, run ntpdate (ntpdate synchronize the time with the server) command as follows:
ntpdate ntp.your-ntp-server.somewhere
For example: ntpdate pool.ntp.org
IMPORTANT NOTE:
You may get an Error message "socket already in use" while running ntpdate command. You will get this error if xntpd is running already in your machine, most probably. So stop xntpd (rcxntp stop) running ntpdate.
Step-2
Add
server ntp.your-ntp-server.somewhere
to NTP Configuration file i.e. /etc/ntp.conf
For Example:
server pool.ntp.org
Step-3
Run rcxntpd restart command.
Check the time difference between the NTP server and Client. If the time difference is more than 1024 seconds, run ntpdate (ntpdate synchronize the time with the server) command as follows:
ntpdate ntp.your-ntp-server.somewhere
For example: ntpdate pool.ntp.org
IMPORTANT NOTE:
You may get an Error message "socket already in use" while running ntpdate command. You will get this error if xntpd is running already in your machine, most probably. So stop xntpd (rcxntp stop) running ntpdate.
Step-2
Add
server ntp.your-ntp-server.somewhere
to NTP Configuration file i.e. /etc/ntp.conf
For Example:
server pool.ntp.org
Step-3
Run rcxntpd restart command.
1 comment:
Finally you may run following command, so that the ntp service will be restarted during reboot.
chkconfig --level 235 xntpd on
Post a Comment