May
10
2010

How To: Use NTP on CentOS Linux to set Time and Date

 

  • Install ntp yum install ntp
  • Take a copy of /etc/ntp.conf
  • Replace the entire contents of /etc/ntp.conf with: restrict default nomodify notrap noquery restrict 127.0.0.1 server now.okstate.edu server clock.nyc.he.net server clock.via.net server ntp-2.vt.edu server  127.127.1.0     # local clock fudge   127.127.1.0 stratum 10 driftfile /etc/ntp/drift
  • Edit /etc/ntp/step-tickers file and REPLACE the contents with: now.okstate.edu clock.nyc.he.net clock.via.net ntp-2.vt.edu
  • Now run the following: # /sbin/chkconfig –level 345 ntpd on # service ntpd restart
  • To check that NTP is running run: #ntpq –p
  • About the Author:

    Comments are closed.