Linux有2个时钟,硬件时钟、系统时钟。date命令看到的是系统时间hwclock看到的是硬件时间hwclock-r#读取硬件时间(-r可省略)hwclock-w#将系统时间写入到硬件hwclock-s#将硬件时间写入到系统#下面为如何配置网络ntpdate更新yuminstall-yntp
ntpdatetime.windows.com
hwclock-w
..
分类:
系统相关 时间:
2015-06-17 01:52:52
阅读次数:
152
yum install ntp ntpdate#ntpdate -u 202.120.2.101//写入硬件#hwclock -w以下是国内常见的NTP服务器ntp.sjtu.edu.cn 202.120.2.101 上海交通大学网络中心s1a.time.edu.cn 北京邮电大学s1b.time....
分类:
其他好文 时间:
2015-06-15 09:09:03
阅读次数:
163
Linux服务器运行久时,系统时间就会存在一定的误差,一般情况下可以使用date命令进行时间设置,但在做数据库集群分片等操作时对多台机器的时间差是有要求的,此时就需要使用ntpdate进行时间同步。date命令:date :查看当前时间,结果如下:Tue Mar 4 01:36:45 CST 201...
分类:
其他好文 时间:
2015-06-12 14:48:42
阅读次数:
5437
1. 构建NTP时间服务器NTP服务器是用于局域网服务器时间同步使用的,可以保证局域网所有的服务器与时间服务器的时间保持一致,某些应用对时间实时性要求高的必须统一时间。互联网的时间服务器也有很多,例如ntpdate ntp.fudan.edu.cn 复旦大学的NTP免费提供互联网时间同步。NTP服....
分类:
系统相关 时间:
2015-06-04 22:33:45
阅读次数:
224
crontab的使用方式介绍定时任务参数详解如下:crontab -l | crontab -e www.2cto.com #*/30 * * * * ntpdate 114.80.81.72*/30 * * * * /usr/sbin/ntpdate 192.168.100.1330 2 * .....
分类:
其他好文 时间:
2015-06-01 18:32:12
阅读次数:
132
[转自qing_gee的专栏:http://blog.csdn.net/qing_gee/article/details/42234997]前言:在我们的项目中,需要同步Linux服务器的时间,于是用到了ntpdate命令,就在crontab中进行了配置,设置为每个小时的整时分钟进行同步,完了后就一...
分类:
系统相关 时间:
2015-05-30 16:29:26
阅读次数:
419
安装ntpdate yum?install?-y?ntpdate 停止ntpdate服务 /etc/init.d/ntpdate?stop 手动同步时间 /usr/sbin/ntpdate?ntp.fudan.edu.cn 设定定时执行 crontab?-e
###?在出现的输入框中输入下面的内容,?144...
分类:
其他好文 时间:
2015-05-27 12:37:06
阅读次数:
147
错误现象:[root@magedu~]#ntpdate192.169.123.14922May20:53:07ntpdate[5580]:noserversuitableforsynchronizationfound[root@magedu~]#ntpdate-d192.169.123.14922May20:48:03ntpdate[5487]:ntpdate4.2.6p5@1.2349-oWedJun1821:20:36UTC2014(1)Lookingforhost192.169.123.149..
分类:
其他好文 时间:
2015-05-23 06:40:11
阅读次数:
589
在我们使用CentOS系统的时候,也许时区经常会出现问题,有时候改完之后还是会出错,下面我们就来学习一种方法来改变这个状况。如果没有安装,而你使用的是 CentOS系统 那使用命令 yum install ntp然后:ntpdate us.pool.ntp.org 。因为CentOS系统是用rhas...
分类:
其他好文 时间:
2015-05-19 12:50:29
阅读次数:
140
[root@songnan00 ~]# crontab -e
crontab: installing new crontab
[root@songnan00 ~]# crontab -l
*/5 * * * * /usr/sbin/ntpdate ntpserver 2>&1 > /dev/null
00 08 * * * /home/songnan/BVT_docker/bvt-scrip...
分类:
系统相关 时间:
2015-05-18 10:55:24
阅读次数:
125