Configure Network Time Protocol (NTP) on CentOS 6.3

Related Articles

Linux LogoAs opposed to the manual setup, it is possible to synchronize the system clock with a remote server over the Network Time Protocol (NTP). NTP is an Internet protocol used to synchronize the clocks of computers or servers to some NTP server on internet or intranet.

Steps A
1. To synchronization immediately or for the one-time synchronization only, use the ntpdate command as below :

[root@centos63 ~]# ntpdate -q time.internet.com

2. Enable running the ntpdate at boot time:

[root@centos63 ~]# chkconfig ntpdate on

Steps B
However, there are alternative way to set the ntpd daemon to synchronize the time at boot time automatically :

1. Install ntpd service daemon :

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

2. Open the NTP configuration file /etc/ntp.conf :

[root@centos63 ~]# vi /etc/ntp.conf

3. Now add or edit the list of public NTP servers.

server 0.asia.pool.ntp.org
server 1.asia.pool.ntp.org
server 2.asia.pool.ntp.org
server 3.asia.pool.ntp.org

4. Set the proper permissions, giving the unrestricted access to localhost only:

restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1

5. Restart the NTP daemon:

[root@centos63 ~]# service ntpd restart
Shutting down ntpd:                                        [  OK  ]
Starting ntpd:                                             [  OK  ]

6.Set ntpd daemon is started at boot time :

[root@centos63 ~]# chkconfig ntpd on
Sign up for the WP Engine affiliate program and receive a minimum of $150 per referral!

As always if you need any help you can reach us on twitter @ehowstuff or drop us a comment below. Jumping through archives page to read more articles..


Skytech is a part time blogger that has over 6 years experience in servicing, repairing and configuring computers and administering the server systems.

Related Articles

  • Rami Nairab

    Thanks for the help on NTPd CentOS service .. I configured it on CentOS 6.5 and it worked fine.

Powered by WordPress · Designed by Theme Junkie