Time synchronization - xntpd
2009-05-13 13:18:14来源:未知 阅读 ()
This article shows you how to ensure the clock on your computer is kept synchronized. It originally dealt only with xntpd, but this is also applicable to ntpd.
See also
NTP
in the
FreeBSD Handbook
.
Details for 5.x were added on 15 July 2004.
2 August 1998
Late last night I was reading up on
Apache
, the http server. It seems a good idea to install a time synchronization daemon because parts of http are expressed as the time of day. So I started looking up some information. xntpd is a Network Time Protocol daemon. I decided to go with that. It comes with FreeBSD; very little effort is required to get it running.
NOTE: under later versions of FreeBSD, notably 4.*, the xntpd binary has been replaced with ntpd. However, the following options will work as shown.
In the
mailing list archives
I found a
message
which showed how to install xntpd. In brief, it outlined the following steps:
1. Create /etc/ntp.conf:
server
driftfile /etc/ntp.drift
Note: Under 5.*, you do not have to include the driftfile line.
2. Enable xntpd by adding the following entries to /etc/rc.conf.
See /etc/defaults/rc.conf for the values you need. They
should look something like this: Under 3.*
xntpd_enable="YES"
xntpd_flags="-c /etc/ntp.conf -p /var/run/xntpd.pid" Under 4.*, you should use this
xntpd_enable="YES"
xntpd_flags="-c /etc/ntp.conf -p /var/run/ntpd.pid" Under 5.*, you should use this
ntpd_enable="YES"3. On the next reboot you'll be syncing clocks automatically.4. Or you can issue this command: Under 3.* /usr/sbin/xntpd -c /etc/ntp.conf -p /var/run/xntpd.pid but under 4.*,
/usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid and under 5.*,
/usr/sbin/ntpd -p /var/run/ntpd.pid -f /var/db/ntpd.driftFor more information on xntpd, try man xntpd or
the
online manual
.
I use my ISP as a time server. You might want to ask your ISP if they provide such a service. If they do, use them. If they don't, try the one resources listed at the end of this article. It's also been pointed out to me that it might pay to use more than one timer server.
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- Freebsd oracle 10g 2009-05-13
- KDE/FreeBSD 测试 QT-4.5.1. 2009-05-13
- OpenBSD 4.5下安装Gnome 2.24成功! 2009-05-13
- OpenBSD 4.5 2009-05-13
- DragonFly BSD 2.2.1发布 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