Setting up Time Server

Chrony is the now the default network time protocol for RHEL/Centos 7. Chrony is an alternative NTP client and server that is designed specifically for systems that are not online all the time.

  • Install Chrony

    yum -y install chrony

  • Edit /etc/chrony.conf . Specifically, add the “allow network” line so your clients can connect to this server locally.

server iburst
server iburst
server iburst
server iburst

stratumweight 0
driftfile /var/lib/chrony/drift
makestep 10 3

# Allow NTP client access from local network.

# Listen for commands only on localhost.
bindcmdaddress ::1
keyfile /etc/chrony.keys
commandkey 1
logchange 0.5
logdir /var/log/chrony
  • On the clients, edit /etc/chrony.conf
# specify chrony server

driftfile /var/lib/chrony/drift
logdir /var/log/chrony
log measurements statistics tracking
keyfile /etc/chrony.keys
commandkey 24
initstepslew 20 master
  • Start chronyd

    systemctl start chronyd

  • Enable chronyd on boot

    systemctl enable chronyd

Using Chrony

  • Checking chrony tracking

    chronyc tracking

  • Checking chrony sources

    chronyc sources

  • Checking chrony source statistics

    chronyc sourcestats

Written on November 19, 2015