: Xiaocheng was released at:. Category: Operating System
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 required 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 first
Yum install-y xinetd rdate
2. Modify/etc/xinetd. d/time-stream. Modify:
Change disable = yes to 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