Register now or log in to join your professional community.
#/etc/init.d/ntpd restart
#ntpdate
1-using #timedatectl set-ntp true
2-chronyd configuration file give entry in format
server servername iburst
Edit /etc/ntp.conf file
# vim /etc/ntp.conf
then change the enter your server's ip and change the stratum value
server <ip> # local clockfudge <ip> stratum <no>
For the Basic NTP time synchronize use below steps :1) Stop the ntp service:# service ntpd stop2) Make a copy of the existing ntp.conf file:# cp -pr /etc/ntp.conf /etc/ntp.conf-orig# cp -pr /etc/sysconfig/ntpd /etc/sysconfig/ntpd_orig3) Edit /etc/ntp.conf and /etc/sysconfig/ntpd change the following lines:server xxx.xxx.xxx.xxx prefer# cat /etc/sysconfig/ntpd# Drop root to id 'ntp:ntp' by default.OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid -x"# Set to 'yes' to sync hw clock after successful ntpdateSYNC_HWCLOCK=yes4) Stop the ntp service:# service ntpd start5) Make sure that the hardware clock is in sync to the systema) Execute date command on the node# dateb) Execute hwclock on the node# hwclock
Step -1: yum install ntp.
Step-2: vi /etc/ntp.conf
Step-3: server0.north-america.pool.ntp.org server1.north-america.pool.ntp.org server2.north-america.pool.ntp.org server3.north-america.pool.ntp.org
Step-4: /etc/init.d/ntpd restart
Step-5: usr/sbin/ntpdate pool.ntp.org