<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[张宴的博客]]></title> 
<link>http://zyan.cc/index.php</link> 
<description><![CDATA[Web系统架构与底层研发]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[张宴的博客]]></copyright>
<item>
<link>http://zyan.cc/post/281/</link>
<title><![CDATA[Linux下快速搭建ntp时间同步服务器[原创]]]></title> 
<author>张宴 &lt;net@s135.com&gt;</author>
<category><![CDATA[其他Unix技术]]></category>
<pubDate>Thu, 09 Aug 2007 05:47:36 +0000</pubDate> 
<guid>http://zyan.cc/post/281/</guid> 
<description>
<![CDATA[ 
	　　[文章作者：张宴 本文版本：v1.1 最后修改：2010.02.21 转载请注明出处：<a href="http://blog.zyan.cc" target="_blank">http://blog.zyan.cc</a>]<br/><br/>一、搭建时间同步服务器<br/>1、编译安装ntp server<br/><div style="border-left: 0px dashed #D6C094; margin: 5px; padding: 3px; margin-bottom:0px; border: 1px dashed #00a0c6; background-color: #ffffff;">wget <a href="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2.6.tar.gz" target="_blank">http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2.6.tar.gz</a><br/>tar zxvf ntp-4.2.6.tar.gz<br/>cd ntp-4.2.6<br/>./configure --prefix=/usr/local/ntp --enable-all-clocks --enable-parse-clocks<br/>make && make install</div><br/>注：如以上下载地址无法访问，请从ntp官方下载网页（<a href="http://www.ntp.org/downloads.html" target="_blank">http://www.ntp.org/downloads.html</a>）寻找下载地址。<br/><br/>2、修改ntp.conf配置文件<br/><div style="border-left: 0px dashed #D6C094; margin: 5px; padding: 3px; margin-bottom:0px; border: 1px dashed #00a0c6; background-color: #ffffff;">vi /etc/ntp.conf</div><br/>①、第一种配置：允许任何IP的客户机都可以进行时间同步<br/>将“restrict default kod nomodify notrap nopeer noquery”这行修改成：<br/><div style="border-left: 0px dashed #D6C094; margin: 5px; padding: 3px; margin-bottom:0px; border: 1px dashed #00a0c6; background-color: #ffffff;">restrict default nomodify</div><br/>配置文件示例：<a href="attachment/200708/ntp_1.txt" target="_blank">/etc/ntp.conf</a><br/><br/>②、第二种配置：只允许192.168.18.***网段的客户机进行时间同步<br/>在restrict default nomodify notrap noquery（表示默认拒绝所有IP的时间同步）之后增加一行：<br/><div style="border-left: 0px dashed #D6C094; margin: 5px; padding: 3px; margin-bottom:0px; border: 1px dashed #00a0c6; background-color: #ffffff;">restrict 192.168.18.0 mask 255.255.255.0 nomodify</div><br/>配置文件示例：<a href="attachment/200708/ntp_2.txt" target="_blank">/etc/ntp.conf</a><br/><br/>3、以守护进程启动ntpd<br/><div style="border-left: 0px dashed #D6C094; margin: 5px; padding: 3px; margin-bottom:0px; border: 1px dashed #00a0c6; background-color: #ffffff;">/usr/local/ntp/bin/ntpd -c /etc/ntp.conf -p /tmp/ntpd.pid</div><br/>4、ntpd启动后，客户机要等几分钟再与其进行时间同步，否则会提示“no server suitable for synchronization found”错误。<br/><br/>二、配置时间同步客户机<br/><div style="border-left: 0px dashed #D6C094; margin: 5px; padding: 3px; margin-bottom:0px; border: 1px dashed #00a0c6; background-color: #ffffff;">vi /var/spool/cron/root</div><br/>增加一行，在每天的5点13分、9点13分、14点13分、19点13分与时间同步服务器进行同步<br/><div style="border-left: 0px dashed #D6C094; margin: 5px; padding: 3px; margin-bottom:0px; border: 1px dashed #00a0c6; background-color: #ffffff;">13 5,9,14,19 * * * /usr/sbin/ntpdate 192.168.18.2</div><br/>备注：如果客户机没有ntpdate，可以下载ntpdate.tar.gz到/usr/sbin/目录，然后解压：<br/><div style="border-left: 0px dashed #D6C094; margin: 5px; padding: 3px; margin-bottom:0px; border: 1px dashed #00a0c6; background-color: #ffffff;">wget <a href="http://blog.zyan.cc/attachment/200708/ntdate.tar.gz" target="_blank">http://blog.zyan.cc/attachment/200708/ntdate.tar.gz</a><br/>cd /usr/sbin/<br/>tar zxvf ntpdate.tar.gz</div><br/>Tags - <a href="http://zyan.cc/tags/linux/" rel="tag">linux</a>
]]>
</description>
</item><item>
<link>http://zyan.cc/post/281/#blogcomment233</link>
<title><![CDATA[[评论] Linux下快速搭建ntp时间同步服务器[原创]]]></title> 
<author>domini &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 09 Aug 2007 09:04:04 +0000</pubDate> 
<guid>http://zyan.cc/post/281/#blogcomment233</guid> 
<description>
<![CDATA[ 
	你的时间服务器没有和标准时间服务器去同步，提供的时间也就不可行了。<br/><br/>加入和公开时间服务器同步的配置会更好
]]>
</description>
</item><item>
<link>http://zyan.cc/post/281/#blogcomment354</link>
<title><![CDATA[[评论] Linux下快速搭建ntp时间同步服务器[原创]]]></title> 
<author>john &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Mon, 24 Sep 2007 07:52:55 +0000</pubDate> 
<guid>http://zyan.cc/post/281/#blogcomment354</guid> 
<description>
<![CDATA[ 
	我编译ntp-4.2.4p4 后，没有发现/etc/ntp.conf，奇怪了。我的系统是CentOS 5.
]]>
</description>
</item><item>
<link>http://zyan.cc/post/281/#blogcomment357</link>
<title><![CDATA[[评论] Linux下快速搭建ntp时间同步服务器[原创]]]></title> 
<author>john &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Tue, 25 Sep 2007 06:23:00 +0000</pubDate> 
<guid>http://zyan.cc/post/281/#blogcomment357</guid> 
<description>
<![CDATA[ 
	编译的ntp无ntp.conf文件，需要rpm包安装。
]]>
</description>
</item><item>
<link>http://zyan.cc/post/281/#blogcomment463</link>
<title><![CDATA[[评论] Linux下快速搭建ntp时间同步服务器[原创]]]></title> 
<author>gregorian &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Wed, 21 Nov 2007 06:56:05 +0000</pubDate> 
<guid>http://zyan.cc/post/281/#blogcomment463</guid> 
<description>
<![CDATA[ 
	感觉你这样设置后，系统时间会有抖动现象，要让客户机不出现抖动，还是要使用ntpd来完成的
]]>
</description>
</item><item>
<link>http://zyan.cc/post/281/#blogcomment1000</link>
<title><![CDATA[[评论] Linux下快速搭建ntp时间同步服务器[原创]]]></title> 
<author>AWE &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Wed, 30 Apr 2008 02:29:29 +0000</pubDate> 
<guid>http://zyan.cc/post/281/#blogcomment1000</guid> 
<description>
<![CDATA[ 
	ntp.conf在源码目录内，需要自己拷贝过去。<br/><br/>没有啊
]]>
</description>
</item><item>
<link>http://zyan.cc/post/281/#blogcomment1001</link>
<title><![CDATA[[评论] Linux下快速搭建ntp时间同步服务器[原创]]]></title> 
<author>AWE &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Wed, 30 Apr 2008 02:29:59 +0000</pubDate> 
<guid>http://zyan.cc/post/281/#blogcomment1001</guid> 
<description>
<![CDATA[ 
	ntp.conf在源码目录内，需要自己拷贝过去。<br/><br/>没有啊
]]>
</description>
</item><item>
<link>http://zyan.cc/post/281/#blogcomment1531</link>
<title><![CDATA[[评论] Linux下快速搭建ntp时间同步服务器[原创]]]></title> 
<author>你就是老师 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 11 Sep 2008 01:08:49 +0000</pubDate> 
<guid>http://zyan.cc/post/281/#blogcomment1531</guid> 
<description>
<![CDATA[ 
	又一个国际贸易系毕业干技术地<br/>看来国际贸易系没前途<br/>学习
]]>
</description>
</item><item>
<link>http://zyan.cc/post/281/#blogcomment1615</link>
<title><![CDATA[[评论] Linux下快速搭建ntp时间同步服务器[原创]]]></title> 
<author>请教 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Mon, 06 Oct 2008 14:26:43 +0000</pubDate> 
<guid>http://zyan.cc/post/281/#blogcomment1615</guid> 
<description>
<![CDATA[ 
	你好<br/>我想问一下，时间服务器同步上一层服务器时间，如何修改配置文件？比如我上一层时间服务器的IP 172.1.1.1<br/>是不是只用加一行service 172.1.1.1 <br/>可是为什么我用ntpq -p不能查看到？<br/>请高手赐教。谢谢
]]>
</description>
</item><item>
<link>http://zyan.cc/post/281/#blogcomment4848</link>
<title><![CDATA[[评论] Linux下快速搭建ntp时间同步服务器[原创]]]></title> 
<author>聚云seo &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Mon, 25 Jan 2010 02:43:14 +0000</pubDate> 
<guid>http://zyan.cc/post/281/#blogcomment4848</guid> 
<description>
<![CDATA[ 
	好长时间没了这里了&nbsp;&nbsp;特地来看看
]]>
</description>
</item><item>
<link>http://zyan.cc/post/281/#blogcomment5032</link>
<title><![CDATA[[评论] Linux下快速搭建ntp时间同步服务器[原创]]]></title> 
<author>策略网页游戏 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Fri, 19 Feb 2010 10:57:40 +0000</pubDate> 
<guid>http://zyan.cc/post/281/#blogcomment5032</guid> 
<description>
<![CDATA[ 
	呵呵&nbsp;&nbsp;网上看到的 过来瞧瞧
]]>
</description>
</item><item>
<link>http://zyan.cc/post/281/#blogcomment5665</link>
<title><![CDATA[[评论] Linux下快速搭建ntp时间同步服务器[原创]]]></title> 
<author>007 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Mon, 19 Apr 2010 10:37:13 +0000</pubDate> 
<guid>http://zyan.cc/post/281/#blogcomment5665</guid> 
<description>
<![CDATA[ 
	搭建步骤看起来也不多啊。。学习下
]]>
</description>
</item><item>
<link>http://zyan.cc/post/281/#blogcomment6840</link>
<title><![CDATA[[评论] Linux下快速搭建ntp时间同步服务器[原创]]]></title> 
<author>sailing123 &lt;safe82@gmail.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Fri, 17 Sep 2010 09:12:25 +0000</pubDate> 
<guid>http://zyan.cc/post/281/#blogcomment6840</guid> 
<description>
<![CDATA[ 
	②、第二种配置：只允许192.168.18.***网段的客户机进行时间同步<br/>在restrict default nomodify notrap noquery（表示默认拒绝所有IP的时间同步）之后增加一行<br/><br/> noquery 不是指时间同步，是指查询 ntp 服务器自身状态，阻止客户端同步是使用ignore&nbsp;&nbsp;参数..
]]>
</description>
</item><item>
<link>http://zyan.cc/post/281/#blogcomment7259</link>
<title><![CDATA[[评论] Linux下快速搭建ntp时间同步服务器[原创]]]></title> 
<author>www.201xtop.com &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Sun, 21 Nov 2010 03:11:23 +0000</pubDate> 
<guid>http://zyan.cc/post/281/#blogcomment7259</guid> 
<description>
<![CDATA[ 
	学习一下 收藏了 以后可能会用到
]]>
</description>
</item><item>
<link>http://zyan.cc/post/281/#blogcomment16291</link>
<title><![CDATA[[评论] Linux下快速搭建ntp时间同步服务器[原创]]]></title> 
<author>liuyuexue &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Tue, 06 Mar 2012 08:30:26 +0000</pubDate> 
<guid>http://zyan.cc/post/281/#blogcomment16291</guid> 
<description>
<![CDATA[ 
	/usr/local/ntp/bin/ntpd -c /etc/ntp.conf -p /tmp/ntpd.pid<br/>-bash: /usr/local/ntp/bin/ntpd: 没有那个文件或目录<br/>为什么我执行启动的时候说没有ntpd文件呢？我看了下 那个路径下就是没有，试了好几次都是这样的，请问我哪里弄错了？
]]>
</description>
</item><item>
<link>http://zyan.cc/post/281/#blogcomment18738</link>
<title><![CDATA[[评论] Linux下快速搭建ntp时间同步服务器[原创]]]></title> 
<author>coach factory outlet &lt;fgf@hotmail.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 17 May 2012 02:59:20 +0000</pubDate> 
<guid>http://zyan.cc/post/281/#blogcomment18738</guid> 
<description>
<![CDATA[ 
	Today, following half a century, mentor leather-bases <a href="http://www.coachfactoryoutletao.net" target="_blank">coach factory outlet</a> continues to be the delicate craft of leather-based master is accountable for,Would you like to meet more friends, or go with the times? If yes, <a href="http://www.coachfactoryoutletao.net" target="_blank">coach factory online</a> is opening welcome doors to you.in the market you definitely can find various colorways that are designed in as well as the high quality that applied in. For most of you would like to come. So just come to our <a href="http://www.coachfactoryoutletao.net" target="_blank">coach factory outlet online</a> store to choose one.
]]>
</description>
</item>
</channel>
</rss>