How I can setup my Linux server to automatically synchronize its server clocks? We need to ensure our server clocks set to correct time always.

Recommended Answers

All 7 Replies

Install and configure the NTP service (either the client, or if you want to be a local time source, the ntpd server as well) - how to do so depends on your distribution though. Its pretty painless on debian and redhat based systems.

Please tell me what distribution and version it is, and whether you have a GUI installed.

it's debian w/o GUI

apt-get install ntp will install a full ntp daemon or apt-get install ntpdate will install a lighter client-only tool.

commented: helpful +21

thank you for your help!

thank you for your help!

No problem. Have marked this one as solved.

Note: When finding servers on the NTP pool site, choose two or three from the same country as you are in

The alternative way is to sync your system time on an hourly basis.

root# crontab -l
MAILTO=""
30 * * * * (/usr/sbin/ntpdate -s ntp.admon.org fr.pool.ntp.org)

Please keep note, you cannot use this crontab with a running NTP server instance.

Cheers,

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.