Score:2

ntpdate unavailable on CentOS8

vn flag

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 ([email protected]) (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 ?

stark avatar
mu flag
`ntpdate` has been deprecated for quite a while since `ntpd` already has the same functionality.
Score:3
cn flag

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.

Luis Vazquez avatar
br flag
The main use of ntpdate is to do the initial sync with a remote NTP server like this: `# ntpdate 10.247.19.254` and this response does not explain how to replace this in CentOS 8, so it should not be condidered an answer to the question
George Y avatar
vn flag
But how to use chrony, say, calibrate the time to a host like `time.windows.com`?
John Mahowald avatar
cn flag
`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.
Score:0
br flag

As stated in the response from @JohnMahowald ntpdate is not included in RedHat Based distros starting with CentOS/EL 8 as all the client NTP functionality (service and command line tools) has been repaced by chrony.

The main use of ntpdate was the initial testing and sync with a remote server like this:

# ntpdate 0.pool.ntp.org
13 Apr 12:38:54 ntpdate[29547]: adjust time server 190.64.134.53 offset 0.008546 sec

As long as I know there is not an exact equivalent command for this in EL8, but something similar can now be accomplished by using chronyd like this:

# chronyd -q 'server 0.pool.ntp.org iburst'
...
2023-04-13T15:39:48Z Initial frequency -13.600 ppm
2023-04-13T15:39:53Z System clock wrong by 0.003503 seconds (step)
2023-04-13T15:39:53Z chronyd exiting

And then you can configure your servers in /etc/chrony.conf start the chronyd service and do an initial quick sync with the following command:

# systemctl restart chronyd
# chronyc -a makestep
200 OK

For more details see: How to resynchronize with chrony?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.