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 ...
随机推荐
- [C++ Primer Plus] 第8章、函数探幽(一)程序清单——内联、引用、格式化输入输出、模板、decltype
程序清单8.1(inline内联函数) #include<iostream> using namespace std; inline double square(double x) {// ...
- Spring cloud Greenwich Eureka
1.父工程POM文件中: <dependencyManagement> <dependencies> <!--spring cloud--> <depende ...
- Oracle使用——oracle11g安装——Oracle要求的结果: 5.0,5.1,5.2,6.0 6.1 之一 实际结果: 6.2
问题 正在检查操作系统要求... 要求的结果: 5.0,5.1,5.2,6.0 之一 实际结果: 6.1 检查完成.此次检查的总体结果为: 失败 <&l ...
- UP_GetRecordByPage
CREATE PROCEDURE [dbo].[UP_GetRecordByPage] @tblName varchar(255), -- 表名 @fldName varchar(255), -- 主 ...
- 小程序之 fixed定位下scroll-view左右滚动失效
红框为悬浮 左右可以滑动 效果如下⬇️ 悬浮把最外层position:fixed;top:0;这个时候上面的导航就可以悬浮 但是会出现左右滑动不了的情况 这是因为我没给设置宽度 这个时候我们把包着sc ...
- leecode第二百三十八题(除自身以外数组的乘积)
class Solution { public: vector<int> productExceptSelf(vector<int>& nums) { int len= ...
- MySQL存储过程 CASE语句
MySQL存储过程 CASE语句 除了IF语句,MySQL提供了一个替代的条件语句CASE. MySQL CASE语句使代码更加可读和高效. CASE语句有两种形式:简单的搜索CASE语句. 简单C ...
- 键盘坏了几个键位之后,linux上的remap方法
Use xev command to find the keycode xmodmap -pke |more To Change keymapping for this Laptop: 我是日文键盘, ...
- ubuntu终端
https://blog.csdn.net/hello_new_life/article/details/75099249 ctrl+altl+F1进入命令行 ctrl+altl+F7退出命令行 在终 ...
- mysql5.7 timestamp错误:there can be only oneTIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE
#1293 - Incorrect table definition; there can be only oneTIMESTAMP column with CURRENT_TIMESTAMP in ...