2

I want to install ntpdate as usual on CentOS8. However, it is not available:

# cat /proc/version
Linux version 4.18.0-240.1.1.el8_3.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC)) #1 SMP Thu Nov 19 17:20:08 UTC 2020

# yum install -y ntpdate
Last metadata expiration check: 2:21:14 ago on Mon 11 Apr 2022 07:39:43 PM CST.
Module yaml error: Unexpected key in data: static_context [line 9 col 3]
Module yaml error: Unexpected key in data: static_context [line 9 col 3]
No match for argument: ntpdate
Error: Unable to find a match: ntpdate

Besides, I also find links lynx unavailable. Is there any way to install ntpdate on CenOS 8 ?

George Y
  • 380
  • 2
  • 11
  • `ntpdate` has been deprecated for quite a while since `ntpd` already has the same functionality. – stark Apr 11 '22 at 16:03

1 Answers1

3

Red Hat stopped packaging ntpd as of EL8, replaced with chrony.

chronyd -Q will query for the offset and quit. Use -f option to provide a config file with different NTP servers.

Other useful commands: chronyc sources -v or chronyc sourcestats -v will show details on configured sources.


Text browsers for CentOS Stream 8 are for some reason in the powertools repo. (But lynx is in Stream 9 AppStream for reasons I don't understand.)

  dnf --enablerepo=powertools list elinks lynx

When you know a package exists, but are unsure of which repo it might be in, there are search engines like pkgs.org. Keep in mind repos are of varying quality and care to avoid conflicts, CentOS wiki has strong opinions on repos.

John Mahowald
  • 30,009
  • 1
  • 17
  • 32
  • But how to use chrony, say, calibrate the time to a host like `time.windows.com`? – George Y Apr 12 '22 at 12:41
  • 1
    `server time.windows.com` in chrony.conf like any other NTP source. However I personally do not like Windows time service as it appears to still not have IPv6 in the year 2022. – John Mahowald Apr 12 '22 at 19:19