Get the App
SLTechnology News&Howtos  ›  Servers  › 

Configure the NTP client on CentOS7.4

Shulou Source: shulou.com Published: 2022-06-03 04:31:12 10月17日 Update

Configuring NTP clients on CentOS 7.4

1. Check for connectivity to NTP servers

[root@TE21 ~]# ntpdate 192.168.1.100

13 Dec 15:10:12 ntpdate[9146]: step time server 192.168.1.100 offset -2289.098141 sec

[root@TE21 ~]# date

Fri Dec 13 15:10:19 CST 2019

2. Setting up NTP clients

[root@TE21 ~]# vi /etc/ntp.conf

server 192.168.1.100 iburst

3. Configure NTP AutoStart

[root@TE21 ~]# systemctl enable ntpd.service

Created symlink from /etc/systemd/system/multi-user.target.wants/ntpd.service to

/usr/lib/systemd/system/ntpd.service.

[root@TE21 ~]# systemctl start ntpd.service

4. Check NTP health

[root@TE21 ~]# ntpstat

synchronised to NTP server (192.168.1.100) at stratum 4

time correct to within 996 ms

polling server every 64 s

[root@TE21 ~]#

[root@TE21 ~]# watch ntpq -p

Every 2.0s: ntpq -p Fri

Dec 13 15:15:25 2019

remote refid st t when poll reach delay offset jitter

==============================================================================

*192.168.1.100 120.25.115.20 3 u 57 64 3 0.173 2.650 0.234

[root@TE21 ~]# ntpdate 192.168.1.100

13 Dec 15:17:27 ntpdate[9312]: the NTP socket is in use, exiting

[root@TE21 ~]#

Done.

Tags: Customer client configuration check situation Server Service run Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Shulou Information Linux MariaDB Apple