How to Install and Configure NTP Server on Ubuntu 14.04

The Network Time Protocol (NTP) is used to synchronize between computer systems over the network. Time synchronization is very crucial to determine when events happened to computers system or server systems. NTP will be very useful when we want to implement replication between servers. NTP uses 123/UDP protocol. Please make sure UDP port from each client to NTP has been opened. This article will describe how to install and configure NTP server on Ubuntu 14.04 server.

1. Install ntp service :

ehowstuff@ubuntu14:~$ sudo apt-get install ntp -y

2. Configure NTP service :

ehowstuff@ubuntu14:~$ sudo vi /etc/ntp.conf

For Malaysia, add the following 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

3. Once configuration file updated, restart ntp to take affect :

ehowstuff@ubuntu14:~$ sudo service ntp restart
 * Stopping NTP server ntpd                                                                  [ OK ]
 * Starting NTP server ntpd                                                                  [ OK ]

4. Verify that NTP service is synchronizing to remote NTP servers :

ehowstuff@ubuntu14:~$ sudo ntpq -p

Example :

ehowstuff@ubuntu14:~$ sudo ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 balthasar.gimas 65.32.162.194    3 u    1   64    1  146.094  -10.741   0.000
 chobi.paina.jp  .INIT.          16 u    -   64    0    0.000    0.000   0.000
 194.27.44.55    .INIT.          16 u    -   64    0    0.000    0.000   0.000
 202-65-114-202. .INIT.          16 u    -   64    0    0.000    0.000   0.000
 europium.canoni .INIT.          16 u    -   64    0    0.000    0.000   0.000

5. Configure NTP for Client :
ubuntu14-ntp1

Leave a Reply

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