The NTP service is divided into two servers: server and client. Select one server and the other three servers as client. For example, if 18.2.4.4 is ntpserver, the other servers are ntpclient.
Ntpserver
1. log on to the server through SSH and go to the/etc directory. We recommend that you back up the NTP. conf file first, and then modify the NTP. conf file to keep the following content:
Server 127.127.1.0
Fudge 127.127.1.0 stratum 8
Restrict 18.2.4.0 mask limit 254.0 nomodify notrap # allowed network segment
2. Run service ntpd restart to restart the NTP service.
3. Run chkconfig -- level 345 ntpd on to enable the NTP service to start with the system.
Ntpclient
1. After the ntpserver end is restarted, execute ntpdate ntpserverip (the IP address of ntpserver is written here) about 5-10 minutes later. A similar case indicates that the synchronization is successful.
----------------------
[Root @ hscbu-tx39 ~] # Ntpdate 18.2.4.4
31 Dec 11:14:50 ntpdate [16457]: Step time server 18.2.4.4 offset 1622240.103462 Sec
----------------------
2. Add system scheduled tasks to ntpclient
[Root @ hscbu-tx39 ~] # Crontab-e
1 ***/usr/sbin/ntpdate 18.2.4.4
3. Other ntpclient operations