linux_wiki:configure_a_system_to_use_time_services

This is an old revision of the document!


Configure A System To Use Time Services

General Information

Managing time using different methods.


  • ntp ⇒ the default in RHEL 5/6
  • chrony ⇒ the default in RHEL 7 (ntp can still be used instead)
    • Chrony has faster time sync than ntp and can recover from network connection problems faster.

Two new RHEL 7 tools:

  • chronyd - new red hat 7 time daemon (ntpd was previous daemon)
  • timedatectl - time and date settings information


View current detailed time information

timedatectl


View available timezones

timedatectl list-timezones


Set timezone

timedatectl set-timezone America/Chicago


Set system clock to 12:30pm and 10 seconds:

timedatectl set-time 12:30:10


Enable the use of NTP for time

timedatectl set-ntp true


NTP service config file (chronyd)

  • /etc/chrony.conf


NTP server entry examples in /etc/chrony.conf

server 0.pool.ntp.org iburst
server 1.pool.ntp.org iburst
server 2.pool.ntp.org iburst
server 3.pool.ntp.org iburst
  • If you make any changes, chronyd service must be restarted


Check status of NTP service, Restart it

systemctl status chronyd
systemctl restart chronyd


View NTP sources

chronyc sources -v

  • linux_wiki/configure_a_system_to_use_time_services.1457064356.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)