How to Configure NTP Server for Time Adjustment on CentOS 6.3

ntpThis post covers the steps to install NTP server on CentOS 6.3. NTP, Network Time Protocol, it is an Internet protocol used to synchronize the clocks of computers or servers to some NTP server on internet or intranet.

1. Install ntp using yum command :

[root@centos63 ~]# yum install ntp -y

2. Once NTP is installed you need to update the configuration file, ntp.conf located in the /etc directory :

[root@centos63 ~]# vi /etc/ntp.conf
# Hosts on local network are less restricted.
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server 0.centos.pool.ntp.org
#server 1.centos.pool.ntp.org
#server 2.centos.pool.ntp.org
server 0.asia.pool.ntp.org
server 1.asia.pool.ntp.org
server 2.asia.pool.ntp.org
server 3.asia.pool.ntp.org

..
..

3. Start the NTP service :

[root@centos63 ~]# /etc/rc.d/init.d/ntpd start
Starting ntpd:                                             [  OK  ]

4. NTP service start at boot :

[root@centos63 ~]# chkconfig ntpd on

5. Test your ntp client status :

[root@centos63 ~]# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 103.6.16.254    10.84.87.146     2 u   16   64    1  129.453   18.233   0.002
 superluminal.sf 189.70.85.38     2 u   16   64    1  128.466    1.971   0.002
 fnttkyo043241.t 165.246.43.176   3 u   15   64    1  125.813   11.528   0.002
 send.mx.cdnetwo 131.107.13.100   2 u   14   64    1  250.371  -53.987   0.002

6. To verify the NTP service is now running on the server using the following command :

[root@centos63 ~]# ps -e | grep ntpd
 5206 ?        00:00:00 ntpd
Leave a Reply

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

SiteGround.com

A world leading hosting company that provides fully-managed innovative and secure solutions, suitable for hosting small to medium-sized websites

Built on the best available technologies combined with Google Cloud for strong redundancy and application availability. Backed by skilled experts to address web security threats, a devops team to create advanced custom security solutions, and 24/7 sysadmins to watch over the platform. This powerful, hands-on approach makes your sites faster, safer, and easier to manage. Starting from only $3.95/mo.

TRY FREE

* up to 30 days money back guarantee