informatique:linux:ntp
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| informatique:linux:ntp [2020/04/29 09:54] – created didzkovitchz | informatique:linux:ntp [2020/04/30 17:27] (current) – didzkovitchz | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== NTP ====== | ====== NTP ====== | ||
| + | |||
| + | ===== Fichier minimal ===== | ||
| + | |||
| + | |||
| + | < | ||
| + | tinker panic 0 | ||
| + | restrict default nomodify notrap noquery | ||
| + | restrict 127.0.0.1 | ||
| + | |||
| + | driftfile / | ||
| + | broadcastdelay | ||
| + | |||
| + | keys / | ||
| + | |||
| + | logfile / | ||
| + | server 10.0.0.25 iburst | ||
| + | #server 10.0.0.26 iburst | ||
| + | </ | ||
| + | |||
| + | ==== Détails ==== | ||
| + | |||
| + | |||
| + | '' | ||
| + | => recommandation Red Hat pour les VM, indiquant au service NTP de ne pas paniquer et s' | ||
| + | |||
| + | '' | ||
| + | '' | ||
| + | => permet de restreindre les clients interrogeant ce serveur | ||
| + | |||
| + | '' | ||
| + | => fichier enregistrant le décalage de la fréquence locale, spécifier ce fichier est une optimisation | ||
| + | |||
| + | '' | ||
| + | => utile pour le débug | ||
| + | |||
| + | |||
| + | ===== Forcer la synchronisation ===== | ||
| + | |||
| + | '' | ||
| + | |||
| + | < | ||
| + | [root@vm-front-01 ~]# service ntpd stop | ||
| + | Arrêt de ntpd : [ OK ] | ||
| + | [root@vm-front-01 ~]# ntpd -gq | ||
| + | ntpd: time set +14.213552s | ||
| + | [root@vm-front-01 ~]# service ntpd start | ||
| + | Démarrage de ntpd : [ OK ] | ||
| + | [root@vm-front-01 ~]# service ntpd status | ||
| + | ntpd (pid 22366) en cours d' | ||
| + | [root@vm-front-01 ~]# tail / | ||
| + | 30 Apr 11:19:06 ntpd[22325]: | ||
| + | 30 Apr 11:19:10 ntpd[22366]: | ||
| + | 30 Apr 11:19:10 ntpd[22366]: | ||
| + | 30 Apr 11:19:10 ntpd[22366]: | ||
| + | 30 Apr 11:19:10 ntpd[22366]: | ||
| + | 30 Apr 11:19:10 ntpd[22366]: | ||
| + | 30 Apr 11:19:10 ntpd[22366]: | ||
| + | 30 Apr 11:19:10 ntpd[22366]: | ||
| + | 30 Apr 11:19:10 ntpd[22366]: | ||
| + | 30 Apr 11:19:11 ntpd[22366]: | ||
| + | [root@vm-front-01 ~]# ntpq -pn | ||
| + | | ||
| + | ============================================================================== | ||
| + | +10.0.0.25 | ||
| + | *10.0.0.26 | ||
| + | [root@vm-front-01 ~]# ntpq -pn | ||
| + | | ||
| + | ============================================================================== | ||
| + | *10.0.0.25 | ||
| + | +10.0.0.26 | ||
| + | [root@vm-front-01 ~]# | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Nombre sources de temps ===== | ||
| + | |||
| + | |||
| + | Il est fortement déconseillé d' | ||
| + | C'est expliqué sur ntp.org : [[http:// | ||
| + | et sur le site de Redhat : [[https:// | ||
| + | |||
| + | |||
| + | ===== ntpq -pn ===== | ||
| + | |||
| + | ça c'est un bon site qui explique simplement l' | ||
| + | [[http:// | ||
| + | |||
| + | |||
| + | ===== ntpdate ===== | ||
| + | |||
| + | '' | ||
| + | [[https:// | ||
| {{tag> | {{tag> | ||
informatique/linux/ntp.1588146847.txt.gz · Last modified: 2020/04/29 09:54 by didzkovitchz
