Notification texts go here Contact Us Buy Now!

Synchronize NTP Time in Linux with Windows sever in Centos

Configure NTP to Synchronize the system clock in CentOS Linux with Windows sever.

Easy installation NTP (Network Time Protocol) by using yum command CentOS based operating system.

Step 1:

You need to install the following packages:

ntp : ntpd server which continuously adjusts system time and utilities used to query and configure the ntpd daemon.
ntpdate : Utility to set the date and time via NTP.
ntp-doc : NTP documentation

Procedure to install NTPD on CentOS

Open the terminal or login over the ssh session. You must login as the root user. Type the following command to install ntpd.

[root@techlanda.com ~]# yum install ntp ntpdate ntp-doc 

Press y to install

Turn on service, enter

[root@techlanda.com ~]# chkconfig ntpd on (Start the service automatically during the system restart)

[root@techlanda.com ~]# service ntpd status

If it's running stop the ntpd service by using the below command.

[root@techlanda.com ~]# service ntpd stop

Step 2: 

Add your DNS IP or FQDN 

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

Add your dns server at the end of the line:

#statistics clockstats cryptostats loopstats peerstats
server 192.168.1.10
server 192.168.1.100

[root@techlanda.com ~]# service ntpd start

 Apply the below command for ntp timesync.

[root@techlanda.com ~]#ntpdate -u 192.168.1.10
[root@techlanda.com ~]#ntpdate -u 192.168.1.100

After updating the DNS you need to restart the ntpd service to apply changes.

[root@techlanda.com ~]#service ntpd restart

Hardware Clock Sync

[root@techlanda.com ~]#hwclock --systohc

Step 3:

Output


[root@techlanda.com ~]#date
Wed Feb 10 00:20:33 IST 2016


I hope you  this information is useful for you. Please forgive any typos or incomplete sentences.

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.