Linux uses NTP service to manage/Synchronize server time
When there are multiple Web servers, and each server's time needs to be consistent, consider using NTP services.
1. Use Ntpstat to see the current status of the NTP service.
#ntpstat
If the output below, the description has not started, you need to set the server restart when the NTP service self-booting:
Unable to the NTP daemon. Is it running?
If the output below illustrates that it is already working:
Synchronised to NTP server (198.55.111.5) at Stratum 3
Time correct to within 238 ms
Polling server every S
If the output: unsynchronised, you need to restart (ntpd restart) to synchronize.
2. Use Ntpq-p to view the list of NTP servers
#ntpq-P
Remote refID St T when poll reach delay offset jitter
==============================================================================
*dns1.synet.edu. 202.118.1.46 2 U 46 64 377 19.924 11.896 5.692
+dns2.synet.edu. 202.118.1.46 2 U 45 64 317 20.518 11.833 6.992
dns.sjtu.edu.cn. STEP. u-64 0 0.000 0.000 0.000
3. Manual Sync Time
#ntpdate
If the output below shows that the NTP service has started to cause manual synchronization time to fail, the NTP service needs to be stopped first:
The NTP socket is on use. Exiting
#service ntpd Stop
#ntpdatecn. pool.ntp.org
If you output the following, the manual synchronization time is successful:
Adjust time server xxx
Finally, remember to start the NTP service and let him update it automatically.
4. Start the NTP service
#service ntpd Start
Starting ntpd: [OK]
Enable NTP to start at boot time with the Chkconfig command.
5. Turn on NTP self-boot
#chkconfig ntpd on
Verify that NTP was enabled with the following command.
6. Check the NTP self-boot situation
#chkconfig--list ntpd
NTPD 0:off1:off2:on3:on4:on5:on6:off
Here ntpd are on Runlevels 2, 3, 4, and 5, which are correct.
7. Customizing the NTP server
Refer here.
http://www.bkjia.com/PHPjc/1108025.html www.bkjia.com true http://www.bkjia.com/PHPjc/1108025.html techarticle Linux uses NTP services to manage/Synchronize server time when there are multiple Web servers, and each server's time needs to be consistent, you can consider using NTP services. 1. First Use ...