One. Time Synchronization server
You can use the database server as a synchronization server
Ntp.conf remains unchanged
Start the service
Service NTPD Start
Set NTPD service self-boot
Chkconfig ntpd on
Check
Chkconfig--list ntpd
Two. Client Configuration
1. Modify the server configuration entry for the ntp.conf.
Comment out any pre-defined server-time-synchronization servers address configurations, such as #server 0.rhel.pool.ntp.org
Add Server 192.168.20.119
2. Stop NTPD Services: Service NTPD stop
cannot be synchronized using the Ntpdate service.
3. The guaranteed time differs from the server time in less than 15 minutes.
Manual synchronization is performed using Ntpdate 192.168.20.119 first.
= = Synchronization Failed
Ntpdate 192.168.20.119
No server suitable for synchronization found
Recommended after 5 minutes; NTP service port is not sealed;
+ = Synchronization Succeeded
Ntpdate 192.168.20.119
15:02:51 ntpdate[10819]: Step time server 192.168.20.119 offset 724.435543 sec
4. Add a Scheduled task
vi/etc/cron.hourly/mydate.sh
Add the following content:
#!/bin/sh
Ntpdate 192.168.20.119
Linux NTP time synchronization