650) this.width=650; "Width=" 821 "height=" 706 "title=" drawing 1.png "style=" width:502px;height:451px; "src="/HTTP/ S1.51cto.com/wyfs02/m01/80/70/wkiol1db0bnx2bbyaadhgnpvym4356.png "alt=" Wkiol1db0bnx2bbyaadhgnpvym4356.png "/>
(i). NTP service end-to-end configuration
NTP Server Installation
[[email protected] ~]# rpm-qa ntpntp-4.2.6p5-5.el6.centos.x86_64[[email protected] ~]# install [[email protected] ~]# Yum -Y Install NTP
2 Modify the NTP configuration file and save the exit
[Email protected] ~]# vim/etc/ntp.conf #restrict default kod nomodify notrap nopeer noquery#restrict-6 default Kod nomo Dify notrap nopeer noquery restrict default nomodify #nomodify客户端可以同步 #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.com # Default time synchronization source changed to Ali and another server time.nist.gov
3. Local scheduled Task If there is a timed task with synchronization time, note time synchronization of timed tasks
[[email protected] ~]# crontab-l #set by Sanlang to get consistent TIME#*/5 * * * */usr/sbin/ntpdate time.nist.gov> /dev/null 2>&1[[email protected] ~]#
4: Start the NTP server
[[email protected] ~]#/etc/init.d/ntpd start[[email protected] ~]# ntpstatsynchronised to NTP Server (182.92.12.11) at S Tratum 3 time correct to within 7946 MS polling server every s[[email protected] ~]#
(b). NTP Client configuration (there will be some delay for the first time)
[[email protected] ~]# ntpdate 10.0.0.6122 may 23:14:48 ntpdate[11916]: Step time server 10.0.0.61 offset 12727.969441 sec [[email protected] ~]# echo "* * * */usr/sbin/ntpdate 10.0.0.61" >>/var/spool/cron/root client writes this command to the scheduled task, it is best to write the comments first
Rethinking: 1. Scheduled tasks can be distributed with a dispenser
2.NTP server-side time will be a single point of failure, so at least two units
3. The client does the timing task to see the demand, how long time synchronizes once
650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0057.gif "alt=" J_0057.gif "/>650" this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0057.gif "alt=" J_0057.gif "/>
This article is from the "expert blog" blog, please be sure to keep this source http://wsxxsl.blog.51cto.com/9085838/1776040
NTP time synchronization