The software described in this documentation is either in Extended Support or Sustaining Support. See https://www.oracle.com/us/support/library/enterprise-linux-support-policies-069172.pdf for more information.
Oracle recommends that you upgrade the software described by this documentation as soon as possible.
To configure the ntpd service on a system:
Install the
ntppackage.#
yum install ntpEdit
/etc/ntp.confto set up the configuration forntpd.NoteThe default configuration assumes that the system has network access to public NTP servers with which it can synchronise. The firewall rules for your internal networks might well prevent access to these servers but instead allow access to local NTP servers.
The following example shows a sample NTP configuration for a system that can access three NTP servers:
server
NTP_server_1serverNTP_server_2serverNTP_server_3server 127.127.1.0 fudge 127.127.1.0 stratum 10 driftfile /var/lib/ntp/drift restrict default nomodify notrap nopeer noqueryThe
serverandfudgeentries for 127.127.1.0 causentpdto use the local system clock if the remote NTP servers are not available. Therestrictentry allows remote systems only to synchronise their time with the local NTP service.For more information about configuring
ntpd, see http://doc.ntp.org/4.2.6p5/manyopt.html.Create the drift file.
#
touch /var/lib/ntp/driftIf remote access to the local NTP service is required, configure the system firewall to allow access to the NTP service on UDP port 123, for example:
#
iptables -I INPUT -p udp -m udp --dport 123 -j ACCEPT#service iptables saveStart the
ntpdservice and configure it to start following a system reboot.#
service ntpd start#chkconfig ntpd on
You can use the ntpq and ntpstat commands to
display information about the operation of ntpd, for example:
#ntpq -premote refid st t when poll reach delay offset jitter ============================================================================== *ns1.proserve.nl 193.67.79.202 2 u 21 64 377 31.420 10.742 3.689 -pomaz.hu 84.2.46.19 3 u 22 64 377 59.133 13.719 5.958 +server.104media 193.67.79.202 2 u 24 64 377 32.110 13.436 5.222 +public-timehost 193.11.166.20 2 u 28 64 377 57.214 9.304 6.311 #ntpstatsynchronised to NTP server (80.84.224.85) at stratum 3 time correct to within 76 ms polling server every 64
For more information, see the ntpd(8),
ntpd.conf(5), ntpq(8), and
ntpstat(8) manual pages and http://doc.ntp.org/4.2.6p5/.

