Linux clock synchronization and linux clock
1. Environment Introduction:
Set Time Synchronization under root User Permissions
Standard Clock Synchronization
3 devices
| IP |
Node |
Function |
192.168.128 |
Master Node |
Ntpd server, used to synchronize Standard Time with external public ntpd |
192.168.129 |
Backup master node |
Ntpd client, used to synchronize time with ntpd |
192.168.130 |
Subnode |
Ntpd client, used to synchronize time with ntpd |
2,Ntp clock synchronization settings
Check whether the ntp service is installed.
If the following message is displayed, the installation is successful.
If not, run yum-y install ntp.
Then: service ntpd restart
3. Configure the ntpd server, that is, the machine with the synchronization time through the internet: 192.168.9.128; synchronize the Internet time to the server machine before the configuration: ntpdate-u cn.pool.ntp.org;
Modify the server configuration file
Vim/etc/ntp. conf
Add the following two items: Set it to the last bit of your IP address and write it to 0;
The configuration is also required later, which is fixed:
The ntp server has been modified so far.
Restart service: service ntpd restart.
Ntpstat indicates that the server time has been synchronized with the Internet.
Configure the Time Synchronization for the client (192.168.9.129/130 ). Modify vim/etc/ntp. conf. You only need to modify these lines. Save and exit. Then, ntpstat.
5. reboot server. Time Synchronization OK.