NTP is installed by default in Linux 6 and 7
Main config file is /etc/ntp.conf
THings have changed a bit RHEL 6 and older
chkconfig ntpd on service ntpd start
RHEL 7
systemctl enable ntpd systemctl status ntpd
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
Port | Protocol |
---|---|
123 | UDP |