NTP Time Server Installation configuration

Source: Internet
Author: User
Tags aliyun

1. Introduction to NTP

NTP, Network Time Protocol, is a protocol that is used to synchronize the time of each computer in a network. Its purpose is to synchronize the computer clock to the World coordinated UTC, its accuracy in the LAN up to 0.1ms, in most places on the Internet its accuracy can reach 1-50ms.

NTP servers provide time synchronization services using the NTP protocol.

2. NTP Server Installation
# system comes with Ntp[[email protected] ~]# Rpm-qa ntpntp-4.2.6p5-5.el6.centos.x86_64# if not installed yum-y install NTP
3. Configuring the NTP Service
[Email protected] ~]# vim/etc/ntp.conf# restrict default kod nomodify notrap nopeer noqueryrestrict default nomodify# No The Modify client can synchronize the # default time synchronization source comment instead to the available source # server 0.centos.pool.ntp.org iburst# server 1.centos.pool.ntp.org iburst# server 2. centos.pool.ntp.org iburst# server 3.centos.pool.ntp.org iburstserver ntp1.aliyun.comserver time.nist.gov
4. Start the NTP server
#  If the scheduled task has time to synchronize, comment first, the two usages will conflict. [[email protected] ~]# crontab -e# time sync by oldboy at  2010-2-1#*/5 * * * * /usr/sbin/ntpdate time.nist.gov >/dev/null 2 >&1[[email protected] ~]# /etc/init.d/ntpd startStarting ntpd:                                                [  OK  ][[email protected] ~]#  ntpq -p     remote            refid      st t when poll reach   delay    offset  jitter==============================================================================*ntp1.aliyun.com 10.137.38.86     2 u   22    64    1  525.885  -42.367   0.000[[ email protected] ~]# ntpstatsynchronised to ntp server  (110.75.186.247)  at stratum 3   time correct to within 4257 ms    polling server every 64 s[[email protected] ~]# ntpdate  10.0.0.9 7 dec 18:43:07 ntpdate[26950]: the ntp socket is in  use, exiting
5. Client Time synchronization

The client will wait a few minutes for time synchronization with the newly-started NTP server, otherwise the error is indicated no server suitable for synchronization found .

[[email protected] ~]# ntpdate 10.0.0.9 7 Dec 18:40:16 ntpdate[1453]: Step time server 10.0.0.9 offset 40.880807 sec # will command into a scheduled task.

This article is from the "post-adolescent Poetry of Youth" blog, so be sure to keep this source http://yunyouth.blog.51cto.com/10925807/1720858

NTP Time Server Installation configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.