主机名vim |
系统版本centos |
IP地址服务器 |
角色ide |
chrony-serverspa |
CentOS7.4server |
172.16.1.62同步 |
chrony服务端it |
chrony-clienttable |
CentOS7.4class |
172.16.1.31 |
chrony客户端 |
# yum -y install chrony
# vim /etc/chrony.conf
3 #server 0.centos.pool.ntp.org iburst
4 #server 1.centos.pool.ntp.org iburst
5 #server 2.centos.pool.ntp.org iburst
6 #server 3.centos.pool.ntp.org iburst
7 server ntp1.aliyun.com
8 server 210.72.145.44
9 server 202.112.10.36
10 server 59.124.196.83
26 #allow 192.168.0.0/16
27 allow 172.16.1.0/24
# systemctl start chronyd #启动chronyd服务,须要等待5分钟左右才能正常同步
# systemctl enable chronyd #加入开机自启动
# chronyc sources -v #查看使用了哪一个时间服务器同步,星号的为正在同步的时间服务器
# chronyc sourcestats -v #查看同步状态
# yum -y install chrony
# vim /etc/chrony.conf
3 #server 0.centos.pool.ntp.org iburst
4 #server 1.centos.pool.ntp.org iburst
5 #server 2.centos.pool.ntp.org iburst
6 #server 3.centos.pool.ntp.org iburst
7 server 172.16.1.62
# systemctl start chronyd
# systemctl enable chronyd
# chronyc sources
# chronyc sourcestats -v #查看同步状态
# timedatectl set-timezone Asia/Shanghai #设置时区
(1)UTC 整个地球分为二十四时区,每一个时区都有本身的本地时间。在国际无线电通讯场合,为了统一块儿见,使用一个统一的时间,称为通用协调时(UTC, Universal Time Coordinated)。
(2)GMT 格林威治标准时间 (Greenwich Mean Time)指位于英国伦敦郊区的×××格林尼治天文台的标准时间,由于本初子午线被定义在经过那里的经线。(UTC与GMT时间基本相同,本文中不作区分)
(3)CST 中国标准时间 (China Standard Time)
GMT + 8 = UTC + 8 = CST
(4)DST夏令时(Daylight Saving Time) 指在夏天太阳升起的比较早时,将时间拨快一小时,以提前日光的使用。(中国不使用)