Installazione e configurazione NTP client su CentOS 7

In questo breve articolo andremo a descrivere come sincronizzare un client con un NTP server.

Consideriamo di utilizzare una CentOS 7 preinstallata (qui per l’installazione) ed aggiorniamola

yum update

nel precedente articolo abbiamo visto come installare l’ NTP server ( qui l’articolo), vediamo come sincronizzare un client (potrebbe essere sia un server che un desktop, in questo articolo consideriamo un server CentOS) ed installiamo il pacchetto

yum install ntpdate

adesso sincronizziamo il client con il server

ntpdate ip_ntp_server

21 Aug 17:04:57 ntpdate[1901]: adjust time server ip_ntp_server offset 0.008415 sec

abilitiamo ntpdate all’avvio

systemctl start ntpdate

systemctl enable ntpdate

E’ possibile importarlo anche permanentemente, modificando il seguente file

vim /etc/ntp/step-tickers

# List of NTP servers used by the ntpdate service.

#0.centos.pool.ntp.org
ip_ntp_server

systemctl restart ntpdate

avremo che dal log ( vim /var/log/messages) comparirà la sincronizzazione all’ NTP server creato in precedenza

Aug 21 17:15:49 centostest systemd: Starting Set time via NTP…
Aug 21 17:15:51 centostest ntpdate[1999]: step time server ip_ntp_server offset 0.004065 sec

Potrebbero interessarti anche...