Pāriet uz saturu

NTP servera konfigurēšana komponentā Edge Gateway

NTP servera izmantošana ļauj sinhronizēt jūsu datoru pulksteņus ar NTP servera pulksteni.
Šajā dokumentācijā ir aprakstīts, kā konfigurēt NTP serveri CyberElements Edge Gateway serverim.

Priekšnosacījumi

Ir nepieciešama SSH vai konsoles piekļuve + iespēja datorā izmantot superlietotāja kontu. Turklāt ir jāpārliecinās, ka serverī ir atvērts UDP ports 123 uz vajadzīgo NTP serveri vai serveriem.

NTP konfigurācija serverī tiek iestatīta failā /etc/systemd/timesyncd.conf.
Lai to izdarītu, atkomentējiet 16. rindu (noņemiet # rindas sākumā) un norādiet konfigurējamo NTP serveri vai serverus.

Piemērs

Lai konfigurētu serverus ntp1.systancia.local un 172.16.20.20, fails būtu konfigurēts šādi:

15
16
17
18
19
20
21
22
[Time]
NTP=ntp1.systancia.local 172.16.20.20
#FallbackNTP=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048
#ConnectionRetrySec=30
#SaveIntervalSec=60

Sistēmas laika sinhronizēšana ar Mediation Controller serveri

Lai sinhronizētu pulksteni starp Edge Gateway serveri un Mediation Controller serveri, NTP konfigurācijā vienkārši ievadiet serveri 127.0.0.1.

Informācija

Papildinformāciju par faila konfigurēšanu var iegūt ar komandu man timesyncd.conf.

Pēc jaunās konfigurācijas saglabāšanas ir jārestartē pakalpojums systemd-timesyncd:

1
systemctl restart systemd-timesyncd