NTP on Oracle Linux 8
NTP or Network Time Protocol is an old and vastly used protocol which is used to synchronize time on computers over the network. This protocol is stable and actively supported. But RHEL Linux 8(on which Oracle Linux 8 is based), NTP is no longer supported and is being replaced a new service called Chrony. The new service has no issues, but the purpose of this article is to describe how we can still use NTP on Oracle Linux 8. There can be many reasons for that such as:
- Old Software and build dependencies
- More support for NTP as this has been ported to many more Operating Systems
- Support for Multicast, Broadcast and Manycast of time which are not supported by Chrony but are supported by NTP.
The following are the assumptions for this article:
- You have installed 64 bit Oracle Linux 8 and have got root access
- You have basic knowledge of Linux System Administration
- You are familiar with Systemd Services.
Build NTP from Source
As NTP package or RPM is not provided from the official Oracle Linux 8,we will build it from source. Here are the steps to do this:
- Get the latest source code from http://www.ntp.org/downloads.html. Use the Production Release always.
- Copy the downloaded tar file to a Linux Machine which should have basic tools present by default.
- Compare the checksum of the tar file downloaded:-
The output should match with the value inside ntp-4.2.8p15.tar.gz.md5 file (which is also downloaded from the same link)
4. Extract the content:
tar -xvzf ntp-4.2.8p15.tar.gz
5. Change directory:
6. Prepare for compilation:
./configure CFLAGS="-O2 -g -fPIC" --prefix=/usr --bindir=/usr/sbin --sysconfdir=/etc…