Commit 75a8f12eba7ac353d3d1c6e0b53d7edda6be722a
1 parent
73adf9aa
Updates chapter1.md
Auto commit by GitBook Editor
Showing
1 changed file
with
9 additions
and
0 deletions
chapter1.md
| @@ -16,10 +16,19 @@ cat /etc/centos-release | @@ -16,10 +16,19 @@ cat /etc/centos-release | ||
| 16 | rpm -qa|grep chrony | 16 | rpm -qa|grep chrony |
| 17 | // 没有找到,yum安装 | 17 | // 没有找到,yum安装 |
| 18 | yum install chrony -y | 18 | yum install chrony -y |
| 19 | +// 修改/etc/chrony.conf配置文件 | ||
| 19 | // 启动chrony服务,加入开机启动项,查看状态 | 20 | // 启动chrony服务,加入开机启动项,查看状态 |
| 20 | systemctl enable chronyd.service | 21 | systemctl enable chronyd.service |
| 21 | systemctl restart chronyd.service | 22 | systemctl restart chronyd.service |
| 22 | systemctl status chronyd.service | 23 | systemctl status chronyd.service |
| 24 | +// 查看时间源服务器状态 | ||
| 25 | +chronyc sources -v | ||
| 26 | +chronyc sourcestats -v | ||
| 27 | +chronyc activity | ||
| 28 | +// 手动同步时间 | ||
| 29 | +chronyc -a makestep | ||
| 30 | +// 与timedatectl关联(TODO:里面NTP syncronized总是no,再议) | ||
| 31 | +timedatectl set-ntp 1 | ||
| 23 | 32 | ||
| 24 | 33 | ||
| 25 | ``` | 34 | ``` |