Create a Standalone ntp Server on Ubuntu 14.04

0 comments
Network Time Protocol (NTP) UDP Port 123 is a networking protocol for time and date synchronisation between two or multiple computers.

We will be using Ubuntu 14.04 64 bit to build our ntp server 
we will first install aptitude package manager for installing ntp services 

sudo  apt-get install aptitude -y

Then we'll install required packages for ntp daemon :

sudo  aptitude -y install ntp

configure the NTP servers we are going to retrieve from. Edit the ntp.conf using the command:

sudo nano /etc/ntp.conf


This is something you should change to a country/Local  instead of the Ubuntu pools. You can find this at the NTP Pool Project. I will be using the Indian pools so change the lines as necessary:

Add a fallback server. Ubuntu already provides their own fallback but we will use the current server’s time as the default. Otherwise you can specify any other server you know of:

# Use Ubuntu's ntp server as a fallback.
#server ntp.ubuntu.com
server 127.127.1.0
fudge 127.127.1.0 stratum 10

Restart the daemon service using the command:

sudo /etc/init.d/ntp restart

Monitor the log to see when it starts synchronising using the command:
tail -f /var/log/syslog



It nothing comes up (which usually happens to me), run the command ‘ntpq -p‘ and it should show you all the time servers you are currently connecting with. This is enough to know if it is synchronized for now.
Your ntp server is configured now !
check if its synchronising properly .

by using command :

#ntpdate 192.168.3.62

after that you will see output something this 
23 May 12:58:39 ntpdate[27589]: adjust time server 192.168.3.62 offset -0.062325 sec




0 comments :

Post a Comment

Copyright 2014 http://techcontrolz.blogspot.in/ .
Blogger Template by Rohan Choudhari. . Creative Commons License