NTP server time configuration

Introduction

The ntp server is a synchronized time server.

open ntpd

1. Check the status (you can see that the status is: inactive, that is, the ntp service is not started)

[root@localhost]$ systemctl status ntpd
● ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled; vendor preset: disabled)
   Active: inactive (dead)

2. start

[root@localhost]# systemctl start ntpd

3. Set the boot to start

[root@node1 ~]# systemctl enable ntpd

View ntpd information

# ntptime
#ntpd -pn

test method

test address

test code

./client ip
./client -s
./client -c

forecast result

Both are the same machine two different machines
Both have ntp Difference Tightens 0 linear
Both have no ntp
One with ntp, one without
Both have ntp, but synchronized to different ntp
Both have ntp, the first as the second both have ntp

Guess you like

Origin blog.csdn.net/dreaming317/article/details/132590960