When configuring multiple servers, you often need to synchronize the time between each server. If the server has an Internet environment, you can directly update the time at the same time as the external server. You can use the rdate command to update the time:
Rdate-s tick.greyware.com
You can write a script and place it in/etc/cron. hourly to correct the time every hour.
In an Intranet environment, you can configure a time server by yourself. Take CentOS as an example. You can configure the time server as follows:
1. install xinetd: sudo yum install-y xinetd first
2. Modify/etc/xinetd. d/time-stream: www.111cn.net
Change disable = yes
Disable = no
3. Start xinetd
Service xinetd start
In this way, other machines can synchronize time with the machine through rdate.
Rdate-s ip Address
For more details, see: http://www.111cn.net/sys/linux/52557.htm