1. When your site architecture involves multiple servers, the time between servers must be synchronized, which involves the accuracy of the time of the program, especially the time-related operations and the timing tasks of the system itself.
2. Time Synchronization tool: Ntpdate, installation method: Yum install-y ntpdate
3. How to use: Ntpdate time.windows.com, synchronize the time of the server you want to sync
Servers that can be synchronized:
Time.nist.gov
Time.nuri.net
asia.pool.ntp.org
asia.pool.ntp.org
asia.pool.ntp.org
asia.pool.ntp.org
4. How to synchronize time:
1): The first is to set the scheduled tasks, scheduled to run ntpdate command update time */10 * * * * ntpdate time.nist.gov
2): Configure/etc/ntp.conf file: Run cat/etc/ntp.conf |awk ' {if ($!~/^$/&& $!~/^#/) {print $}} ' command to view configuration
Restrict default ignore//does not allow modification or querying of NTP, and does not receive special packets
Restrict 127.0.0.1//Give all permissions to this machine
Restrict 192.168.1.0 mask 255.255.255.0 notrap nomodify//The machine has synchronization time permissions to the LAN machine
Server time.nist.gov prefer//Set time server, plus prefer for priority
Server 0.asia.pool.ntp.org
Server 1.asia.pool.ntp.org
Server 2.asia.pool.ntp.org
Server 127.127.1.0 # Local clock
Fudge 127.127.1.0 Stratum 10
Driftfile/var/lib/ntp/drift
Keys/etc/ntp/keys
3) When the configuration is complete, start the service:/ETC/INIT.D/NTPD start
4) View sync: NTPQ-PN
Synchronization of CentOS system time