How to Install and Configure NTP Server on Ubuntu 14.04

Share this Article :

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 :

[email protected]:~$ sudo apt-get install ntp -y

2. Configure NTP service :

[email protected]:~$ 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 :

[email protected]:~$ 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 :

[email protected]:~$ sudo ntpq -p

Example :

[email protected]:~$ 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