NTP client setup
From Smith family
| Server setup | |
| ← Previous | Next → |
| DNS | SSL certificates |
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.
The default 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:~# apt-get install ntp
- Update
/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:~# /etc/init.d/ntp restart
- 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.
See also
- This is pretty much taken from the notes in the Ubuntu server guide.
- The NTP documentation has more information.
