Install and config NTP to sync the system clock

Vuong Tran
1 min readJun 7, 2017

--

Question: how to I install and config to sync the system clock under CentOS version 5.x or 6.x?

You can install NTP (aka Network Time Protocol) using the yum command, the install process require some packages:

  • ntp: ntpd server daemon to query and config.
  • ntpdate: Utility to set the date and time via NTP.
  • ntp-doc: NTP document
Link: https://en.wikipedia.org/wiki/Network_Time_Protocol

Setup

Login as root over the ssh session, type the following yum command to install

$ yum install ntp ntpdate npt-doc

Add ntpd service start when server reboot

$ chkconfig ntpd on

Sync the system clock with 0.pool.ntp.org server

$ ntpdate pool.ntp.org

Start ntpd service

$ /etc/init.d/ntpd start or service ntpd start

Happy coding!

--

--