NTP Client Configuration on CentOS
Just some quick note on configuring NTP client on CentOS/RHEL/Fedora and forcing time update. Just got tired of having to remember these steps every time I run into NTP.
#!/bin/bash date yum -y install ntp cat << EOF > /etc/ntp.conf driftfile /var/lib/ntp/drift restrict default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery restrict 127.0.0.1 restrict -6 ::1 server 0.pool.ntp.org server 1.pool.ntp.org server 2.pool.ntp.org server 3.pool.ntp.org includefile /etc/ntp/crypto/pw keys /etc/ntp/keys EOF chkconfig ntpd on service ntpd stop ntpdate 0.pool.ntp.org service ntpd restart date