Ensure that the host time is synchronized with the network time. This example is for reference only; please configure according to the specific circumstances of the standby disaster recovery host.

Windows

Example OS: Windows Server 2012 R2

Configure using the Windows time tools.

Click on the Windows icon on the desktop > Open Control Panel > Select “Date and Time” for configuration.

Configure the time synchronization service for the source host - 图1

Configure the time synchronization service for the source host - 图2

Configure time to synchronize automatically with Internet time synchronization servers.

In the “Date and Time” tab, click on “Internet Time”,Click on “Change settings.”

Configure the time synchronization service for the source host - 图3

Check the “Synchronize with an Internet time server” option.From the “Server” dropdown menu, choose a time server (e.g., time.windows.com).

Configure the time synchronization service for the source host - 图4

Click “Update now” to test the connection and wait for confirmation.Click “OK” to save the changes.

Configure the time synchronization service for the source host - 图5

Configure automatic synchronization with the local time synchronization server.

If your host is in an intranet environment, you need to configure the address to be your local time synchronization server address.

:::tips

The is the IP address of your NTP server.

:::

Configure the time synchronization service for the source host - 图6

Click “Update now” to test the connection and wait for confirmation.Click “OK” to save the changes.

Configure the time synchronization service for the source host - 图7

Linux

Example OS: CentOS Linux release 7.5

Install NTP

  1. [root@node ~]# yum install -y ntp

Start the NTP service

  1. [root@node ~]# systemctl start ntpd
  2. [root@node ~]# systemctl enable ntpd
  3. Created symlink from /etc/systemd/system/multi-user.target.wants/ntpd.service to /usr/lib/systemd/system/ntpd.service.

View NTP service status

  1. [root@node ~]# systemctl status ntpd
  2. ntpd.service - Network Time Service
  3. Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
  4. Active: active (running) since Thu 2022-08-04 08:00:47 CST; 7h left
  5. Main PID: 20746 (ntpd)
  6. Tasks: 1
  7. Memory: 768.0K
  8. CGroup: /system.slice/ntpd.service
  9. └─20746 /usr/sbin/ntpd -u ntp:ntp -g
  10. Aug 04 08:00:47 node ntpd[20746]: Listen normally on 6 lo ::1 UDP 123
  11. Aug 04 08:00:47 node ntpd[20746]: Listen normally on 7 ens33 fe80::8a83:7297:7cb8:9934 UDP 123
  12. Aug 04 08:00:47 node ntpd[20746]: Listening on routing socket on fd #24 for interface updates
  13. Aug 04 08:00:47 node systemd[1]: Started Network Time Service.
  14. Aug 04 08:00:47 node ntpd[20746]: 0.0.0.0 c016 06 restart
  15. Aug 04 08:00:47 node ntpd[20746]: 0.0.0.0 c012 02 freq_set kernel 0.000 PPM
  16. Aug 04 08:00:47 node ntpd[20746]: 0.0.0.0 c011 01 freq_not_set
  17. Aug 04 08:00:56 node ntpd[20746]: 0.0.0.0 c61c 0c clock_step -28798.353463 s
  18. Aug 04 00:00:57 node ntpd[20746]: 0.0.0.0 c614 04 freq_mode
  19. Aug 04 00:00:58 node ntpd[20746]: 0.0.0.0 c618 08 no_sys_peer

Modify the ntp.conf file

Please make sure to replace time.example.com with the actual NTP server address you want to use. This command will directly save the file after modification, so ensure that your configuration changes are error-free before executing.
  1. # Comment out lines starting with 'server'.
  2. # Add new NTP server addresses at the end of the file.
  3. [root@localhost ~]# sudo sed -i -e '/^server/ s/^server/#&/' -e '$ a server time.example.com iburst' /etc/ntp.conf

Restart the service

  1. [root@node ~]# systemctl restart ntpd

Check synchronization status

  1. [root@node ~]# ntpq -p
  2. remote refid st t when poll reach delay offset jitter
  3. ==============================================================================
  4. 203.107.6.88 100.107.25.114 2 u 2 64 1 30.975 149.499 0.393