********chrony Time Synchronization Service * * * *
vim/etc/chrony.conf/* Time synchronization configuration file
Service time synchronization party:
1. Sign out of an already accepted service
3 #server 0.rhel.pool.ntp.org iburst/* Service party must unregister services that are synchronized at other times
4 #server 1.rhel.pool.ntp.org Iburst
5 #server 2.rhel.pool.ntp.org Iburst
6 #server 3.rhel.pool.ntp.org Iburst
2. Set the allowed IP address
# Allow NTP Client access from the local network. /* Open an IP time period that allows synchronization time
Allow 192.168/16
3. Setting the allowable level
# Serve Time even if not synchronized to any NTP server. /* Set Service level
10 local stratum
4. Turn off the firewall(Note: Time synchronization can not turn off the firewall to accept the time synchronization side)
Systemctl Stop Firewalld
5. Restart the Chronyd service
Systemctl Restart Chronyd.service
Accept the time synchronization party
1. Set the IP address of the synchronization server
# Please consider joining the pool (http://www.pool.ntp.org/join.html)./* Set the IP address of the server to synchronize
3 #server 0.rhel.pool.ntp.org Iburst
4 #server 1.rhel.pool.ntp.org Iburst
5 #server 2.rhel.pool.ntp.org Iburst
6 #server 3.rhel.pool.ntp.org Iburst
7 Server 172.25.254.254 Iburst
2. Restart the Chronyd service
Systemctl Restart Chronyd.service
3. Test whether time synchronization is successful
Chronyc sources-v
****** Setting the time zone *******
TIMEDATECTL Status/* View time zone settings
Set-time/* Set Current time
Set-timezone/* Set current time zone
SET-LOCAL-RTC 0|1/* Set whether to use UTC time (UTC London time)
The following is the log capture format
$template Westos, "%timegenerated%%fromhost-ip%%syslogtag%%msg%\n"
%timegenerated%/* Realistic Log time
%fromhost-ip%/* Real host IP
%syslogtag%/* Log contents
\ n/* line break
The tenth chapter time synchronization Chrony