NTP client setup
|← Previous||Next →|
NTP (network time protocol) is a way of sending time across the internet. If a machine has an NTP client, it will keep its clock synchronised with various atomic clocks.
ntupdate system synchronises the clock on every boot, but for long-running machines the clock can drift quite a bit between boots. A better option is to install the
ntp daemon, which reset the clock every few minutes to prevent it getting too far adrift.
- Install the daemon
root@server:~# aptitude install ntp
/etc/ntp.confto point to nearby servers
server ntp.ubuntu.com server uk.pool.ntp.org
- (find a nearby server from the list of NTP server pools).
- Restart the
ntpdaemon so it knows about the new server
root@server:~# systemctl restart ntp
- If the clock is a few minutes off, it may confuse other server processes when
ntpresets it the first time, so you may need to restart those servers. It may be easier to just reboot the machine.