User Tools

Site Tools


linux:linux-services:ntp

Setting up NTP

Initial setup

NTP is installed by default in Linux 6 and 7

Main config file is /etc/ntp.conf

Making Sure its Running

THings have changed a bit RHEL 6 and older

chkconfig ntpd on
service ntpd start

RHEL 7

systemctl enable ntpd
systemctl status ntpd

Testing Troubleshooting

Checking if ntp server is available from the machine

ntpdate -q ip-address|name of NTP server

once you verified it you can use

ntpdate ip-address|name of NTP server

To set up time

You can check it with

ntpq -p
ntpstat

To quickly synchronize the servers

# systemctl stop ntpd
# ntpdate 10.5.6.11
5 Jul 10:36:58 ntpdate[2190]: adjust time server 95.81.173.74 offset -0.005354 sec
# systemctl start ntpd

Firewall settings

Port Protocol
123 UDP

Setting Firewall in RHEL 7

linux/linux-services/ntp.txt · Last modified: by 127.0.0.1