Linux:时间同步
时间同步
硬件时间的设置
hwclock clock clock和hwclock用法相近,只用一个就行,只不过clock命令除了支持x86硬件体系外,还支持Alpha硬件体系。
查看硬件时间
hwclock hwclock --show hwclock -r
- 系统时间和硬件时间的同步
同步系统时间和硬件时间,可以使用hwclock命令。
以系统时间为基准,修改硬件时间
hwclock --systohc<== sys(系统时间)to(写到)hc(Hard Clock)
hwclock -w
以硬件时间为基准,修改系统时间
hwclock --hctosys
hwclock -s
- 用ntpdate从时间服务器更新时间
如果你的linux系统根本没有ntpdate这个命令
yum install ntp
安装完了之后,你不要做什么配置,也不需要,直接测试一下
ntpdate time.nist.gov
Oct :: ntpdate[]: adjust time server 207.200.81.113 offset -0.018788 sec
如果出去上面的内容说明,同步成功了。然后在/etc/crontab里面加上以下内容。
# Example of job definition:
# .---------------- minute ( - )
# | .------------- hour ( - )
# | | .---------- day of month ( - )
# | | | .------- month ( - ) OR jan,feb,mar,apr ...
# | | | | .---- day of week ( - ) (Sunday= or ) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
*/ * * * * ntpdate time.nist.gov #域名或IP
每隔十分钟同步一次。
Linux:时间同步的更多相关文章
- Linux时间同步方式记录
Linux时间同步 部署Hadoop集群,遇到各个linux服务器的时间不同步的问题,于是研究了一下linux的时间同步方式,特将同步方式,总结如下: A. 前提条件 a) 网络是连通 ...
- linux时间同步,ntpd、ntpdate
linux时间同步,ntpd.ntpdate 在Windwos中,系统时间的设置很简单,界面操作,通俗易懂.而且设置后,重启,关机都没关系.系统时间会自动保存在Bios的时钟里面,启动计算机的时候,系 ...
- linux 时间同步的2种方法(转)
linux 时间同步的2种方法 张映 发表于 2012-10-23 分类目录: 服务器相关 标签:linux, ntp, 同步, 时间服务器 由于硬件的原因,机器或多或少的根标准时间对不上,一个月的误 ...
- Linux 时间同步 01 简介
Linux 时间同步 01 简介 目录 Linux 时间同步 01 简介 时间同步 公共NTP服务器地址及IP 系统时间相关文件 时间同步 大数据产生与处理系统是各种计算设备集群的,计算设备将统一.同 ...
- Linux 时间同步 03 ntpdate时间同步
Linux 时间同步 03 ntpdate时间同步 目录 Linux 时间同步 03 ntpdate时间同步 安装ntpdate 修改/etc/sysconfig/ntpdate 使用ntpdate手 ...
- Linux 时间同步 04 ntp时间同步
Linux 时间同步 04 ntp时间同步 目录 Linux 时间同步 04 ntp时间同步 安装ntp 配置与外部时间服务器进行时间同步的客户端主机 配置其他客户端与以上客户端主机时间同步 验证查看 ...
- Linux 时间同步 02 ntpd、ntpdate的区别
Linux 时间同步 02 ntpd.ntpdate的区别 目录 Linux 时间同步 02 ntpd.ntpdate的区别 [一]这样做不安全. [二]这样做不精确. [三]这样做不够优雅. ntp ...
- Linux 时间同步 05 chrony时间同步
Linux 时间同步 05 chrony时间同步 目录 Linux 时间同步 05 chrony时间同步 chrony 的优势: chrony包介绍 安装chrony 配置与外部时间服务器进行时间同步 ...
- linux 时间同步的2种方法
转载自: http://blog.51yip.com/server/1474.html 由于硬件的原因,机器或多或少的根标准时间对不上,一个月的误差几秒到几分钟不等.对于服务器来说时间不准,会有很多麻 ...
- Linux时间同步,ntpdate命令、ntpd服务详解
声明:以下内容来自网友整理(http://blog.sina.com.cn/s/blog_636a55070101u1mg.html),为便于以后学习暂时收录,请不要随意转载 Linux默认情况下,系 ...
随机推荐
- 20145310 《Java程序设计》第9周学习总结
20145310 <Java程序设计>第9周学习总结 教材学习内容总结 本周主要进行第十六章和第十七章的学习. JDBC全名Java DataBase Connectivity,是java ...
- Kali视频学习1-5
Kali视频学习1-5 安装 安装Kali虚拟机 设置网络更新,使用了163的源 deb http://mirrors.163.com/debian wheezy main non-free cont ...
- http://www.kindsoft.net/docs/qna.html
http://www.kindsoft.net/docs/qna.html 感觉 Kindediter 非常好用 界面效果好 API也全面 很不错的编辑器
- vCenter Server 6.7 集成 vRealize Orchestrator 7.5
第一步,安装独立Orchestrator 7.5,并初始化 Orchestrator ova导入和初始化步骤省略...请参考官方文档... Orchestrator 初始化中的认证源需要和vCen ...
- linux如何以十六进制格式来查看任意文件
答:vim+xxd 使用方法如下: 1.vim -b file.txt 2.在vim的命令行模式下对文件进行16进制转换 输入:%!xxd 3.在vim的命令行模式下回到正常格式 输入:%!xxd - ...
- MySQL——修改数据表
1.添加单列: ALERT TABLE tbl_name ADD [COLUMN] col_name column_definition [FIRST|AFTER col_name 其中tbl_nam ...
- SpringMVC HttpMessageConverter 匹配规则
以下内容,如有问题,烦请指出,谢谢! SpringMVC启动时会自动配置一些HttpMessageConverter,接收到http请求时,从这些Converters中选择一个符合条件的来进行Http ...
- Linux 下 YUM 安装 PHP 5.5 (及5.6)
原文链接: http://blog.aboutc.net/linux/50/yum-install-php-on-linux 系统环境: CentOS 6.4 x86_64 Fedora 20 x86 ...
- Elasticsearch Server,2nd Edition pdf 翻译 中文
很偶然的机会,就需要接触到搜索,入门就是google trend已然超过solr的ES.在入门的时候找书的时候发现没有中文版的.于是自己开始翻译Elasticsearch Server,2nd Edi ...
- LeetCode——Unique Paths
Question A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram be ...