Synchronize its Linux with NTP server
This article has been created by an automatic translation software. You can view the article source here.
Introduction
It is sometimes necessary to have high precision in the configuration of the time on your machine. Is particularly the case for the good functioning of distributed systems.
So let's study activation and configuration of the NTP client on a system using systemd (Debian 8 / CentOS / RHEL).
Place
First, check the status of the synchronization of the time service :
$ sudo systemctl status systemd-timesyncd.service
systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; disabled)
Active: inactive (dead)
Docs: man:systemd-timesyncd.service(8)
Then make sure that the synchronization via NTP service is No.t active with "NTP enabled: No." et "NFTP synchronized: no".
$ sudo timedatectl
Local time: mer. 2016-09-16 09:39:44 CET
Universal time: mer. 2016-09-16 08:39:44 UTC
RTC time: mer. 2016-09-16 08:39:44
Time zone: Europe/Paris (CET, +0100)
NTP enabled: no
NTP synchronized: no
RTC in local TZ: no
DST active: no
Last DST change: DST ended at
dim. 2015-10-25 02:59:59 CEST
dim. 2015-10-25 02:00:00 CET
Next DST change: DST begins (the clock jumps one hour forward) at
dim. 2016-03-27 01:59:59 CET
dim. 2016-03-27 03:00:00 CEST
Then edit the file /etc/systemd/timesyncd.conf :
[Time] Servers=ntp01.ikoula.com
Start to finish time synchronization service :
$ sudo systemctl start systemd-timesyncd.service; sudo systemctl enable systemd-timesyncd.service
Votre service NTP est maintenant actif et l'heure se synchronisera avec les Servers NTP d'Ikoula.
This article seem useful to you ?
Enable comment auto-refresher