linux 中NTP时间同步

There are tow pen source software related to the NTP in linux, The first is ntpdate, the second is ntpd. you can install them as following:
    apt-get installl ntp; apt-get install openntpd;
or emerge ntp; emerge openntpd.

ntpdate can be run manually as necessary to set the host clock, or it can be run from the host startup script to set the clock at boot time. This is useful in some cases to set the clock initially before starting the NTP daemon ntpd. It is also possible to run ntpdate from a cron script. However, it is important to note that ntpdate with contrived cron scripts is no substitute for the NTP daemon, which uses sophisticated algorithms to maximize accuracy and reliability while minimizing resource use. Finally, since ntpdate does not discipline the host clock frequency as does ntpd, the accuracy using ntpdate is limited.

The ntpd program is an operating system daemon which sets and maintains the system time of day in synchronism with Internet standard time servers. It is a complete implementation of the Network Time Protocol (NTP) version 4, but also retains compatibility with version 3, as defined by RFC-1305, and version 1 and 2, as defined by RFC-1059 and RFC-1119, respectively. ntpd does most computations in 64-bit floating point arithmetic and does relatively clumsy 64-bit fixed point operations only when necessary to preserve the ultimate precision, about 232 picoseconds. While the ultimate precision is not achievable with ordinary workstations and networks of today, it may be required with future gigahertz CPU clocks and gigabit LANs.

时间: 2024-08-20 02:54:32

linux 中NTP时间同步的相关文章

关于Linux中的时间同步问题

原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://dgd2010.blog.51cto.com/1539422/844400 本文主要介绍了Linux中的时间.时区以及时间同步问题. 本文的适应范围:Red Hat/CentOS Linux操作系统 时间同步不是时钟同步,时钟不同步会导致通信(数据传输)失败:不同系统之间时间的不同步可能导致Samba.FTP等服务发生不可预料错误或故障,同时可以免于恶毒或恶意软件的攻击. Net

linux中ntp安全漏洞修复教程

CVE-2013-5211漏洞说明: CVE-2013-5211最早公布是2014年1月10日,由于NTP本身不会验证发送者的源ip地址.这就类似于DNS解析器使用的DRDoS(分布式反射型拒绝服务攻击).攻击者HACK发送了一个伪造报文发送给NTP服务器Server A,将数据包中的源ip地址改成了受害者Client A的ip地址.NTP服务器Server A会响应这个请求,相对于初始请求,响应包发送的字节数是一个被放大的量,导致受害者Client A被dos攻击.最高的两个消息类型:REQ_

Linux下快速搭建ntp时间同步服务器(转载:http://www.linuxidc.com/Linux/2014-07/104371.htm)

背景: 服务器多了,时间是否一致以及是否准备就显得格外重要,虽然这个问题总是被忽略,但是统一时间是很有必要的,因为时间问题导致服务出现问题也是司空见惯,本文简单介绍Linux下ntp的快速搭建和使用. CentOS NTP服务器安装与配置 http://www.linuxidc.com/Linux/2014-01/95258.htm Linux实战部署系列之NTP服务器 http://www.linuxidc.com/Linux/2013-11/92275.htm 多种操作系统NTP客户端配置 

Linux中自动同步世界时间的方法介绍

微软公司授时主机(美国) time.windows.com 台警大授时中心(台湾) asia.pool.ntp.org 中科院授时中心(西安) 210.72.145.44 网通授时中心(北京) 219.158.14.130 Linux下的时间同步命令 ntpdate asia.pool.ntp.org 把时间写入BIOS命令 hwclock [-rw] -r:查看现有BIOS时间 -w:将现在的linux系统时间写入BIOS中 当我们进行完 Linux 时间的校时后,还需要以 hwclock -

详解Unix/Linux中周期执行指令Crontab命令_unix linux

简介 crontab命令常见于Unix和类Unix的操作系统之中,用于设置周期性被执行的指令.该命令从标准输入设备读取指令,并将其存放于"crontab"文件中,以供之后读取和执行. 通常,crontab储存的指令被守护进程激活,crond常常在后台运行,每一分钟检查是否有预定的作业需要执行.这类作业一般称为cron jobs. cron 是 Unix/Linux 中提供定期执行 shell 命令的服务,包括 crond 和 crontab 两部分:      crond: cron

在 Linux 中查看你的时区

在这篇短文中,我们将向你简单介绍几种 Linux 下查看系统时区的简单方法.在 Linux 机器中,尤其是生产服务器上的时间管理技能,是在系统管理中一个极其重要的方面. Linux 包含多种可用的时间管理工具,比如 date 或 timedatectlcommands,你可以用它们来获取当前系统时区,也可以将系统时间与 NTP 服务器同步,来自动地.更精确地进行时间管理. 好,我们一起来看几种查看我们的 Linux 系统时区的不同方法. 1.我们从使用传统的 date 命令开始 使用下面的命令,

如何在Linux中查看你的时区

在这篇短文中,我们将向你简单介绍几种 Linux 下查看系统时区的简单方法.在 Linux 机器中,尤其是生产服务器上的时间管理技能,是在系统管理中一个极其重要的方面. Linux 包含多种可用的时间管理工具,比如 date 或 timedatectlcommands,你可以用它们来获取当前系统时区,也可以将系统时间与 NTP 服务器同步,来自动地.更精确地进行时间管理. 好,我们一起来看几种查看我们的 Linux 系统时区的不同方法. 1.我们从使用传统的 date 命令开始 使用下面的命令,

linux配置ntp服务器的方法_Linux

一.安装ntp软件 1.检查是否安装了ntp相关包. rpm -qa | grep ntp 2.安装ntp软件. yum -y install ntp 二.参数讲解 ignore  :关闭所有的 NTP 联机服务 nomodify:客户端不能更改服务端的时间参数,但是客户端可以通过服务端进行网络校时. notrust :客户端除非通过认证,否则该客户端来源将被视为不信任子网 noquery :不提供客户端的时间查询:用户端不能使用ntpq,ntpc等命令来查询ntp服务器 notrap :不提供

linux中了minerd之后的完全清理过程(详解)_Linux

一不小心装了一个Redis服务,开了一个全网的默认端口,一开始以为这台服务器没有公网ip,结果发现之后悔之莫及啊 某天发现cpu load高的出奇,发现一个minerd进程 占了大量cpu,google了一下,发现自己中招了 下面就是清理过程 第一步 1.立即停止redis服务,修改端口权限,增加密码措施 2.按照网上的资料 删除 crontab 里的两个内容 sudo rm /var/spool/cron/root sudo rm /var/spool/cron/crontabs/root 3