1, Environment Introduction:
Set the time synchronization under root user rights
Standard clock synchronization
3 Sets of equipment
Ip |
Node |
Role |
192.168.128 |
Master Node |
NTPD server for synchronizing standard time with external public ntpd |
192.168.129 |
Alternate Master Node |
NTPD client, for synchronizing time with NTPD |
192.168.130 |
Child nodes |
NTPD client, for synchronizing time with NTPD |
2.NTP clock synchronization setup Step
Check that the NTP service is installed.
The following appears to indicate that the installation was successful.
If it is not installed: Yum-y install NTP.
Then: Service ntpd restart
3, configure the NTPD server, is the network synchronization time of the machine: 192.168.9.128; Synchronize the external network time to the server machine before configuration: Ntpdate-u cn.pool.ntp.org;
Modifying a server configuration file
Vim/etc/ntp.conf
Add the following two items: This set to its own IP last one to write 0;
This also needs to be configured in the back, which is fixed:
The NTP server modification ends here.
Restart Services: Service ntpd restart.
Ntpstat indicates that the server time has been synchronized with the external network.
Configures the client's time synchronization (192.168.9.129/130). The same is to modify the vim/etc/ntp.conf, only to modify these lines. Save exit. Then, Ntpstat.
5, the last reboot server. Time synchronization OK.
Linux clock synchronization