centos7搭建时间服务器
时区概念
GMT、UTC、CST、DST
UTC:整个地球分为二十四个时区,每个时区都有自己的本地时间,在国际无线电通信场合,为了统一起见,使用一个统一的时间,称为通用协调时间(UTC:Universal Time Coordinated)。
GMT:格林威治标准时间(Greenwich Mean Time)位于英国伦敦郊区的皇家格林尼治天文台的标准时间,因为本初子午线被定义在通过那里的线经(UTC与GMT时间基本相同)
CST:中国标准时间(China Standard Time)
GMT + 8 = UTC + 8 = CST
DST:夏令时(Daylight Saving time)指在夏天太阳升起的比较早时,将时间拔快一小时,以提早日光的使用(中国不使用)。
服务器端
服务器端防火墙放行NTP服务
firewall-cmd --zone=public --add-service=ntp
安装程序包
yum install ntp ntpdate -y
编辑配置文件
#新增日志文件
logfile /var/log/ntpd.log
#允许本地网络到此服务器同步时间
restrict 192.168.2.0 mask 255.255.255.0 nomodify notrap
#从阿里云的时间服务器同步时间
server ntp.aliyun.com
server time.nist.gov
#避免客户端报错:Server dropped: strata too high
server 127.127.1.0 fudge
127.127.1.0 stratum 8
启动服务
systemctl start ntpd
systemctl enable ntpd.service 设置开机启动
验证服务
[root@node72 log]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*203.107.6.88 10.165.84.13 2 u 1 64 377 29.922 -11.007 1.615
time-b-wwv.nist .INIT. 16 u - 256 0 0.000 0.000 0.000
LOCAL(0) .LOCL. 5 l 727 64 0 0.000 0.000 0.000
[root@node72 log]# date -R
Fri, 15 Feb 2019 10:47:07 +0800
客户端
远程同步测试
[root@master ~]# ntpdate -d 192.168.2.72
10 Feb 23:31:47 ntpdate[58114]: ntpdate 4.2.6p5@1.2349-o Fri Apr 13 12:52:28 UTC 2018 (1)
Looking for host 192.168.2.72 and service ntp
host found : node72.magedu.com
transmit(192.168.2.72)
receive(192.168.2.72)
transmit(192.168.2.72)
receive(192.168.2.72)
transmit(192.168.2.72)
receive(192.168.2.72)
transmit(192.168.2.72)
receive(192.168.2.72)
server 192.168.2.72, port 123
stratum 6, precision -23, leap 00, trust 000
refid [192.168.2.72], delay 0.02618, dispersion 0.00000
transmitted 4, in filter 4
reference time: e010a2ef.1b1c4a77 Fri, Feb 15 2019 10:31:11.105
originate timestamp: e010a2f5.a34d1179 Fri, Feb 15 2019 10:31:17.637
transmit timestamp: e00ac26a.072e828e Sun, Feb 10 2019 23:31:54.028
filter delay: 0.02623 0.02618 0.02620 0.02618
0.00000 0.00000 0.00000 0.00000
filter offset: 385164.0 385163.9 385163.7 385163.6
0.000000 0.000000 0.000000 0.000000
delay 0.02618, dispersion 0.00000
offset 385163.916949
10 Feb 23:31:54 ntpdate[58114]: step time server 192.168.2.72 offset 385163.916949 sec
centos7搭建时间服务器的更多相关文章
- CentOS7搭建时间服务器-chrony(不坑)
标签(linux): chrony 笔者Q:972581034 交流群:605799367.有任何疑问可与笔者或加群交流 之前centos6我们一直用的ntp时间服务器,虽然到CentOS7上也可以装 ...
- CentOS7搭建时间服务器-chrony
系统:centos7防火墙:关闭防火墙和selinux软件:chrony centos6我们一直用的ntp时间服务器,虽然到CentOS7上也可以装ntp.但是各种问题.所以建议centos7使用 ...
- CentOS7 搭建 SVN 服务器
CentOS7 搭建 SVN 服务器 介绍SVN: SVN是Subversion的简称,是一个开放源代码的版本控制系统,相较于RCS.CVS,它采用了分支管理系统,它的设计目标就是取代CVS.互联网上 ...
- centos7 搭建WEB服务器
centos7 搭建WEB服务器 2017年09月17日 09:44:50 逝然1994 阅读数:18321 标签: centosapacheweb服务器 更多 个人分类: centos服务器简单配置 ...
- Centos7 Ntp 时间服务器
Centos7 Ntp 时间服务器 安装环境 [root@m02 ~]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) 安装 ...
- centos7搭建svn服务器及客户端设置
centos7搭建svn服务器及客户端设置 centos7貌似预装了svn服务(有待确认),因此我们直接启动该服务即可 一.svn服务端配置(服务器IP假设为192.168.100.1) 步骤1:创建 ...
- CentOS7搭建NTP服务器及客户端同步时间
一.服务器配置 1.查看服务器.客户端操作系统版本 [root@hadoop101 ~]# cat /etc/redhat-release CentOS Linux release (Core) 2. ...
- centos7 搭建DHCP服务器
一.DHCP简单讲解 DHCP就是动态主机配置协议(Dynamic Host Configuration Protocol)是一种基于UDP协议且仅限用于局域网的网络协议,它的目的就是为了减轻TCP/ ...
- centos7 搭建svn服务器&客户端的访问&备份迁移
当今用于版本控制的软件程序主要的有svn和git,其它软件咱不熟悉,今天记录下搭建svn服务器和svn客户端使用: 使用环境:虚拟机为centos7系统,svn服务器安装在centos7系统平台上,s ...
随机推荐
- Xml & Tomcat
文档声明: 简单声明, version : 解析这个xml的时候,使用什么版本的解析器解析 <?xml version="1.0" ?> encoding : 解析xm ...
- jsp中的绝对路径、相对路径和访问jsp的方式
1.jsp的绝对路径 绝对路径在复制jsp时不用修改路径都会正常显示,但是绝对路径${pageContext.request.contextPath}只有jsp可以识别 例如:相对路径:image/l ...
- Flutter去除右上角Debug标签
void main(){ runApp(new MyApp()); } class MyApp extends StatefulWidget { @override _MyAppState creat ...
- mysql查询表是否存在
查询表是否存在 SHOW TABLES LIKE "表名" tp5查询表是否存在 Db::query('SHOW TABLES LIKE "表名"');
- krpano 常用标签
<krpano></krpano>根标签 相当于 <body> <scene></scene>一个全景图场景 <image> 图 ...
- 蚂蚁风险大脑亮相ATEC城市峰会:为数字经济时代做好“安全守护”
2019年1月4日,以“数字金融新原力(The New Force of Digital Finance)”为主题的蚂蚁金服ATEC城市峰会在上海隆重举行.大会聚焦金融数字化转型,分享新技术的发展趋势 ...
- ubuntu使用抓包工具,charles
参考官网:https://www.charlesproxy.com/documentation/installation/apt-repository/ wget -q -O - https://ww ...
- regression | p-value | Simple (bivariate) linear model | 线性回归 | 多重检验 | FDR | BH | R代码
P122, 这是IQR method课的第一次作业,需要统计检验,x和y是否显著的有线性关系. Assignment 1 1) Find a small bivariate dataset (pref ...
- yii2部署nginx
页面全部提示404,nginx平台下需要额外配置yii rewrite规则,配置如下: 在nginx 的配置文件nginx.conf //增加部分 location / { # Redirect ev ...
- Altium Designer添加元件库文件
1 默认元件库路径 C:\Users\Public\Documents\Altium\AD 10.0.0.20340\Library 2 创建元件原理图库 图2.1 新建schlib 图2.2 绘制元 ...