The page has been translated by Gen AI.

Configure Linux NTP

Users who create a Virtual Server with Rocky Linux or Oracle Linux via the Samsung Cloud Platform Console need additional configuration for time synchronization (NTP:Network Time Protocol). For other standard Linux images (RHEL, Alma Linux, Ubuntu), NTP is already configured, so no extra setup is required.

Installing NTP Daemon

You can configure NTP by installing the chrony daemon. To install the chrony daemon, follow the steps below.

Reference
For detailed information about chrony, see the chronyc page.
  1. Check whether the chrony package is installed by using the dnf command as the root user on the OS of the Virtual Server.

    Color mode
    dnf list chrony
    dnf list chrony
    Code block. dnf command - command to verify the chrony package installation

    • If the chrony package is installed, the following result is displayed.
Color mode
[root@scp-test-vm-01 ~] # dnf list chrony
Last metadata expiration check: 1:47:29 ago on Wed 19 Feb 2025 05:55:57 PM KST.
Installed Packages
chrony.x86_64                              3.5-1.0.1.el8                                              @anaconda
[root@scp-test-vm-01 ~] # dnf list chrony
Last metadata expiration check: 1:47:29 ago on Wed 19 Feb 2025 05:55:57 PM KST.
Installed Packages
chrony.x86_64                              3.5-1.0.1.el8                                              @anaconda
code block. dnf command - result of checking chrony package installation
  1. If the chrony package is not installed, install the chrony package using the dnf command.
    Color mode
    dnf install chrony -y
    dnf install chrony -y
    code block. dnf command - chrony package installation verification command

Configuring NTP Daemon

Reference
For detailed information about chrony, see the chronyc page.

To configure the chrony daemon, follow these steps.

  1. Open the /etc/chrony.conf file using a text editor (e.g., vim).
  2. Add the following content to the /etc/chrony.conf file and save it.
Color mode
server 198.19.0.54 iburst
server 198.19.0.54 iburst
Code block. Edit /etc/chrony.conf
  1. Use the systemctl command to configure the chrony daemon to start automatically.
Color mode
systemctl enable chronyd
systemctl enable chronyd
Code block. systemctl command - configure automatic start of chrony daemon
  1. Restart the chrony daemon using the systemctl command.

    Color mode
    systemctl restart chronyd
    systemctl restart chronyd
    code block. systemctl command - restart chrony daemon

  2. Run the chronyc sources command with the “v” option (display detailed information) to check the IP address of the configured NTP server and verify whether synchronization is in progress.

    Color mode
    chronyc sources -v
    chronyc sources -v
    Code block. chronyc sources command - check NTP synchronization

    • When you run the chronyc sources command, the following result is displayed.
Color mode
[root@scp-test-vm-01 ~] # chronyc sources -v

210 Number of sources = 1



  .-- Source mode   '^' = server,   '=' = peer,   '#' = local clock.

 / .- Source state     '*' = current synced,   '+' = combined ,   '-' = not combined,

| /    '?' = unreachable,   'x' = time may be in error,   '~' = time too variable.

|| .- xxxx [ yyyy ] +/- zzzz

||                      Reachability register (octal) -.                        |  xxxx = adjusted offset,

||                      Log2(Polling interval) --.          |                    |  yyyy = measured offset,

||                                                             |                   |  zzzz = estimated error.

||                                                        |       |                   

MS Name/IP address                  Stratum   Poll   Reach   LastRx   Last    sample

=========================================================================

^* 198.19.0.54                                 2      6     377      52      -129us[  -128us] +/-     14ms
[root@scp-test-vm-01 ~] # chronyc sources -v

210 Number of sources = 1



  .-- Source mode   '^' = server,   '=' = peer,   '#' = local clock.

 / .- Source state     '*' = current synced,   '+' = combined ,   '-' = not combined,

| /    '?' = unreachable,   'x' = time may be in error,   '~' = time too variable.

|| .- xxxx [ yyyy ] +/- zzzz

||                      Reachability register (octal) -.                        |  xxxx = adjusted offset,

||                      Log2(Polling interval) --.          |                    |  yyyy = measured offset,

||                                                             |                   |  zzzz = estimated error.

||                                                        |       |                   

MS Name/IP address                  Stratum   Poll   Reach   LastRx   Last    sample

=========================================================================

^* 198.19.0.54                                 2      6     377      52      -129us[  -128us] +/-     14ms
Code block. chronyc sources command - check NTP synchronization
  1. Run the chronyc tracking command to check the synchronization metrics.
    Color mode
    [root@scp-test-vm-01 ~] # chronyc tracking
    Reference ID        : A9FEA9FE (198.19.0.54)
    Stratum              : 3
    Ref time  (UTC)     : Wed  Feb  19  18:48:41  2025
    System time         : 0.000000039 seconds fast of NTP time
    Last offset            : -0.000084246 seconds
    RMS offset           : 0.000084246 seconds
    Frequency            : 21.667 ppm slow
    Residual freq        : +4.723 ppm
    Skew                  : 0.410 ppm
    Root delay           : 0.000564836 seconds
    Root dispersion     : 0.027399288 seconds
    Update interval      : 2.0 seconds
    Leap status           : Normal
    [root@scp-test-vm-01 ~] # chronyc tracking
    Reference ID        : A9FEA9FE (198.19.0.54)
    Stratum              : 3
    Ref time  (UTC)     : Wed  Feb  19  18:48:41  2025
    System time         : 0.000000039 seconds fast of NTP time
    Last offset            : -0.000084246 seconds
    RMS offset           : 0.000084246 seconds
    Frequency            : 21.667 ppm slow
    Residual freq        : +4.723 ppm
    Skew                  : 0.410 ppm
    Root delay           : 0.000564836 seconds
    Root dispersion     : 0.027399288 seconds
    Update interval      : 2.0 seconds
    Leap status           : Normal
    code block. chronyc tracking command - NTP synchronization metric
Change IP
Configure RHEL Repo and WKMS