
This 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