Clock Synchronization with NTP
2009-05-13 07:53:49来源:未知 阅读 ()
Overview
Over time, a computer's clock is prone to drift. The Network Time Protocol (NTP) is one way to ensure your clock stays accurate.
Many Internet services rely on, or greatly benefit from, computers' clocks being accurate. For example, a web server may receive requests to send a file if it has been modified since a certain time. In a local area network environment, it is essential that computers sharing files from the same file server have synchronized clocks so that file timestamps stay consistent. Services such as
cron(8)
also rely on an accurate system clock to run commands at the specified times.
FreeBSD ships with the
ntpd(8)
NTP server which can be used to query other NTP servers to set the clock on your machine or provide time services to others.
Choosing Appropriate NTP Servers
In order to synchronize your clock, you will need to find one or more NTP servers to use. Your network administrator or ISP may have set up an NTP server for this purpose--check their documentation to see if this is the case. There is an
online list of publicly accessible NTP servers
which you can use to find an NTP server near to you. Make sure you are aware of the policy for any servers you choose, and ask for permission if required.
Choosing several unconnected NTP servers is a good idea in case one of the servers you are using becomes unreachable or its clock is unreliable.
ntpd(8)
uses the responses it receives from other servers intelligently--it will favor unreliable servers less than reliable ones.
Configuring Your Machine
Basic Configuration
If you only wish to synchronize your clock when the machine boots up, you can use
ntpdate(8)
. This may be appropriate for some desktop machines which are frequently rebooted and only require infrequent synchronization, but most machines should run
ntpd(8)
.
Using
ntpdate(8)
at boot time is also a good idea for machines that run
ntpd(8)
. The
ntpd(8)
program changes the clock gradually, whereas
ntpdate(8)
sets the clock, no matter how great the difference between a machine's current clock setting and the correct time.
To enable
ntpdate(8)
at boot time, add ntpdate_enable="YES" to /etc/rc.conf. You will also need to specify all servers you wish to synchronize with and any flags to be passed to
ntpdate(8)
in ntpdate_flags.
General Configuration
NTP is configured by the /etc/ntp.conf file in the format described in
ntp.conf(5)
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
下一篇:php 列出目录内容
- Freebsd oracle 10g 2009-05-13
- KDE/FreeBSD 测试 QT-4.5.1. 2009-05-13
- 提示:bad kernel: arp : 内网IP地址 is on em0 but got rep 2009-05-13
- OpenBSD 4.5下安装Gnome 2.24成功! 2009-05-13
- OpenBSD 4.5 2009-05-13
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash