• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Time goes out of sync on a node running CentOS/RHEL 7

By admin

The Scenario

The system is not configured to use the ntpd service to synchronize time and date.

CentOS/RHEL 7 uses systemd to manage services. The timedatectl utility is distributed as part of the systemd, and allows you to review and change the configuration of the system clock: change the current date and time, set the time zone, or enable automatic synchronization of the system clock with a remote server.

The NTP service is enabled, but as this system is running CentOS/RHEL 7, timedatectl also needs to be configured to enable NTP, as it is used to manage the date and time on the system.

# timedatectl
...
NTP enabled: no
...

This shows system is not using NTP.

The Solution

Force NTP usage for time synchronisation:

# timedatectl set-ntp 1

Then do the following:

1. Restart systemd time date control.

# systemctl restart systemd-timedated.service

2. Start the ntp service

# systemctl start ntpd

3. Sync the time with the remote server

# ntpq -p

Filed Under: CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. Using cut on Linux Terminal
  2. Linux Interview Questions – Basic File and Directory Permissions
  3. OpenLDAP Server and Client Utilities list
  4. How to Integrate CentOS/RHEL system into an AD Domain with LDAP/Kerberos/SSSD
  5. How to Audit for Modifications to files and Executions of Files in Linux
  6. How To Add New Disk to An Existing Diskgroup on RAC Cluster or Standalone ASM Configuration
  7. Beginners Guide to Managing Package Module Streams in CentOS/RHEL 8
  8. CentOS / RHEL : How to install and start the Apache httpd service
  9. How to Run a Script When USB Devices Is Attached or Removed Using UDEV
  10. Linux OS Service ‘iptables’

You May Also Like

Primary Sidebar

Recent Posts

  • What are Command Rules in oracle Database
  • Using Rule Sets in Oracle Database Vault
  • How Realms Work in Oracle Database Vault
  • How to use Privilege Analysis in Oracle Database
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary