Technical

Chrony as NTP Server

Use Chrony as central NTP server to decrease complexity of future change in confiugration.

vim /etc/chrony.conf

 Time server
 server 1.1.1.1 prefer iburst minpoll 4 maxpoll 4
 Use public servers from the pool.ntp.org project.
 Please consider joining the pool (http://www.pool.ntp.org/join.html).
 pool 4.amazon.pool.ntp.org iburst
 Record the rate at which the system clock gains/losses time.
 driftfile /var/lib/chrony/drift
 Allow the system clock to be stepped in the first three updates
 if its offset is larger than 1 second.
 makestep 1.0 3
 port 123
 Allow NTP client access from local network.
 allow 192.68.1.0/24
 allow 192.68.2.0/24
 Specify file containing keys for NTP authentication.
 keyfile /etc/chrony.keys
 Specify directory for log files.
 logdir /var/log/chrony
 Select which information is logged.
 log measurements statistics tracking
 save data between restarts for fast re-load
 dumponexit
 dumpdir /var/run/chrony
 use a key to secure communication between chronyc and the daemon
 commandkey key1

NTPDate as the client in hourly cron job

#For centos 7
yum install ntpdate -y

crontab -e 

#Hourly time sync
0 * * * * /usr/sbin/ntpdate 10.10.1.7

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA