Here are two machines rac01 and RAC02, now to keep RAC02 time and rac01 consistent---will be rac01 and RAC02 in sync.
1. Manual synchronization Method:
Execute on RAC02
Service NTPD stop;
Ntpdate 189.60.100.11
Both machines (RAC01 as SERVER,RAC02 as client) are set to:
Date--set= "1/14/2013 11:43" The initial time difference between the two machines is not a matter of seconds.
Hwclock--SYSTOHC sync to bios
Hwclock-w Writing to Bios
And make sure that the firewall does not prohibit 123 ports, and then configure/etc/ntp.conf, ntp.conf, and verify the wording and verification see later. Some books say to Ntpdate 189.60.100.11 (server address), ntpdate do not seem to do, anyway, after the configuration is good after 64s will be synchronized.
And then
Service NTPD Start
You can start the NTP service.
Validation of Ntp.conf's writing and time synchronization success
NTP server side:
[Email protected] oracle]# cat/etc/ntp.conf | Grep-v ' ^# '
Driftfile/var/lib/ntp/drift
Restrict 189.60.100.0 mask 255.255.255.0
Server 127.127.1.0 # Local clock
Fudge 127.127.1.0 Stratum 10
[Email protected] oracle]# Ntpstat
Synchronised to local net at Stratum 11
Time correct to within one MS
Polling server every 1024x768 s
The output of the Ntpstat is visible rac01 has synchronized with itself.
NTP Client:
[Email protected] oracle]# cat/etc/ntp.conf | Grep-v ' # '
Driftfile/var/lib/ntp/drift
Server 189.60.100.11
[Email protected] oracle]# Ntpstat
Unsynchronised
Time Server re-starting
Polling server every S
[Email protected] oracle]# ntpq-p
Remote refID St T when poll reach delay offset jitter
==============================================================================
RAC01 LOCAL (0) each U 24 64 1 0.388 0.107 0.000
Actually appear above when a column of numerical value is already in sync, after a few minutes Ntpstat output synchronization success:
[Email protected] oracle]# ntpq-p
Remote refID St T when poll reach delay offset jitter
==============================================================================
*RAC01 LOCAL (0) each U 57 64 377 0.196 0.019 0.013
[Email protected] oracle]# Ntpstat
Synchronised to NTP server (189.60.100.11) at Stratum 12
Time correct to within MS
Polling server every S
The Ntpstat output indicates that the synchronization with NTP server was successful.
Synchronizing two Linux server time synchronization scenarios