Difference between revisions of "NTP: Server Time Sync"

From Kolmisoft Wiki
Jump to navigationJump to search
(New page: To sync time on server , you need ntpdate utility. On Centos: yum install ntp On debian: apt-get install ntpdate So we can sync time with public NTP server: ntpdate pool.ntp.org Mak...)
 
Line 14: Line 14:


Make periodically sync time:
Make periodically sync time:
touch /var/log/ntpdate.log
touch /var/log/ntpdate.log
crontab -e
crontab -e


and insert:
and insert:
04      0,8,16  *      *      *      root    ntpdate pool.ntp.org >>/var/log/ntpdate.log
04      0,8,16  *      *      *      root    ntpdate pool.ntp.org >>/var/log/ntpdate.log
<Press ENTER>
<Press ENTER>

Revision as of 09:00, 2 July 2008

To sync time on server , you need ntpdate utility.

On Centos: yum install ntp

On debian: apt-get install ntpdate


So we can sync time with public NTP server: ntpdate pool.ntp.org


Make periodically sync time:

touch /var/log/ntpdate.log crontab -e

and insert:

04 0,8,16 * * * root ntpdate pool.ntp.org >>/var/log/ntpdate.log <Press ENTER>

And save. That's all